added factory code, and the beginnings of styling
This commit is contained in:
committed by
Raphael Coeffic
parent
169dd1219d
commit
7271c4f730
@@ -25,10 +25,14 @@
|
|||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "libopenui.h"
|
#include "libopenui.h"
|
||||||
|
|
||||||
|
LvglWidgetFactory fullScreenDialogFactory = LvglWidgetFactory([] (lv_obj_t *parent) {
|
||||||
|
return lv_obj_create(nullptr);
|
||||||
|
});
|
||||||
|
|
||||||
FullScreenDialog::FullScreenDialog(
|
FullScreenDialog::FullScreenDialog(
|
||||||
uint8_t type, std::string title, std::string message, std::string action,
|
uint8_t type, std::string title, std::string message, std::string action,
|
||||||
const std::function<void(void)>& confirmHandler) :
|
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),
|
type(type),
|
||||||
title(std::move(title)),
|
title(std::move(title)),
|
||||||
message(std::move(message)),
|
message(std::move(message)),
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class SetupWidgetsPage: public FormWindow
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SetupWidgetsPage(ScreenMenu* menu, uint8_t customScreenIdx):
|
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),
|
menu(menu),
|
||||||
customScreenIdx(customScreenIdx)
|
customScreenIdx(customScreenIdx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Topbar * TopbarFactory::create(Window * parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
|
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)
|
menu(menu)
|
||||||
{
|
{
|
||||||
// remember focus
|
// remember focus
|
||||||
|
|||||||
Reference in New Issue
Block a user