fix(color): fullscreen widget exit when entered via keys

Related #2182
This commit is contained in:
Raphael Coeffic
2022-09-17 09:40:13 +02:00
parent c903e5bc97
commit c3660ab931
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -86,6 +86,11 @@ void Widget::onEvent(event_t event)
} }
#endif #endif
void Widget::onCancel()
{
if (!fullscreen) Button::onCancel();
}
void Widget::update() void Widget::update()
{ {
auto container = dynamic_cast<WidgetsContainer*>(parent); auto container = dynamic_cast<WidgetsContainer*>(parent);
+1
View File
@@ -108,6 +108,7 @@ class Widget : public Button
uint32_t focusGainedTS = 0; uint32_t focusGainedTS = 0;
bool fullscreen = false; bool fullscreen = false;
void onCancel() override;
void onLongPress() override; void onLongPress() override;
virtual void onFullscreen(bool enable) {} virtual void onFullscreen(bool enable) {}
}; };