added factory code, and the beginnings of styling

This commit is contained in:
kkoenig1@optonline.com
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 169dd1219d
commit 7271c4f730
3 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -25,10 +25,14 @@
#include "opentx.h"
#include "libopenui.h"
LvglWidgetFactory fullScreenDialogFactory = LvglWidgetFactory([] (lv_obj_t *parent) {
return lv_obj_create(nullptr);
});
FullScreenDialog::FullScreenDialog(
uint8_t type, std::string title, std::string message, std::string action,
const std::function<void(void)>& confirmHandler) :
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, true),
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, &fullScreenDialogFactory),
type(type),
title(std::move(title)),
message(std::move(message)),
+1 -1
View File
@@ -161,7 +161,7 @@ class SetupWidgetsPage: public FormWindow
{
public:
SetupWidgetsPage(ScreenMenu* menu, uint8_t customScreenIdx):
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS,true),
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
menu(menu),
customScreenIdx(customScreenIdx)
{
+1 -1
View File
@@ -34,7 +34,7 @@ Topbar * TopbarFactory::create(Window * parent)
}
SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS, true),
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
menu(menu)
{
// remember focus