Split number of topbar widgets for vertical and horizontal LCD. Add Exit button to topbar widgets setup.
This commit is contained in:
@@ -57,6 +57,15 @@ SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
|
|||||||
auto widget = new SetupWidgetsPageSlot(this, rect, topbar, i);
|
auto widget = new SetupWidgetsPageSlot(this, rect, topbar, i);
|
||||||
if (i == 0) widget->setFocus();
|
if (i == 0) widget->setFocus();
|
||||||
}
|
}
|
||||||
|
#if defined(HARDWARE_TOUCH)
|
||||||
|
new Button(
|
||||||
|
this, {0, 0, MENU_HEADER_BUTTON_WIDTH, MENU_HEADER_BUTTON_WIDTH},
|
||||||
|
[this]() -> uint8_t {
|
||||||
|
this->deleteLater();
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
|
NO_FOCUS | FORM_NO_BORDER);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupTopBarWidgetsPage::deleteLater(bool detach, bool trash)
|
void SetupTopBarWidgetsPage::deleteLater(bool detach, bool trash)
|
||||||
|
|||||||
@@ -29,7 +29,11 @@
|
|||||||
#define WIDGET_NAME_LEN 10
|
#define WIDGET_NAME_LEN 10
|
||||||
#define MAX_WIDGET_OPTIONS 5 // Name?
|
#define MAX_WIDGET_OPTIONS 5 // Name?
|
||||||
|
|
||||||
|
#if LCD_W > LCD_H
|
||||||
#define MAX_TOPBAR_ZONES 4
|
#define MAX_TOPBAR_ZONES 4
|
||||||
|
#else
|
||||||
|
#define MAX_TOPBAR_ZONES 2
|
||||||
|
#endif
|
||||||
#define MAX_TOPBAR_OPTIONS 1 // just because of VC++ which doesn't like 0-size arrays :(
|
#define MAX_TOPBAR_OPTIONS 1 // just because of VC++ which doesn't like 0-size arrays :(
|
||||||
|
|
||||||
// Common 'ZoneOptionValue's among all layouts
|
// Common 'ZoneOptionValue's among all layouts
|
||||||
|
|||||||
Reference in New Issue
Block a user