Fix for #529 Allows to exit widget setup screen using touch interface. Take 2 (#533)

* Allow touc interface support for widget setup exit

* fix

* Create BACK Button.
This commit is contained in:
eshifri
2021-08-02 13:52:19 +02:00
committed by GitHub
parent bb60d62267
commit 2a1f34a037
+11 -1
View File
@@ -177,6 +177,16 @@ class SetupWidgetsPage: public FormWindow
auto widget = new SetupWidgetsPageSlot(this, rect, customScreens[customScreenIdx], i);
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
}
#if defined(DEBUG_WINDOWS)
@@ -208,7 +218,7 @@ class SetupWidgetsPage: public FormWindow
#if defined(HARDWARE_TOUCH)
bool onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY,
coord_t slideX, coord_t slideY) override
{
{
FormWindow::onTouchSlide(x, y, startX, startY, slideX, slideY);
return true;
}