fix(color): Quick menu does not close properly. (#4332)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
@@ -40,17 +40,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ViewMainMenu::ViewMainMenu(Window* parent, std::function<void()> closeHandler) :
|
ViewMainMenu::ViewMainMenu(Window* parent, std::function<void()> closeHandler) :
|
||||||
Window(parent->getFullScreenWindow(),
|
Window(parent->getFullScreenWindow(), {0, 0, LCD_W, LCD_H}),
|
||||||
{(LCD_W - VM_W) / 2, (LCD_H - VM_H) / 2, VM_W, VM_H}, 0, 0,
|
|
||||||
etx_modal_dialog_create),
|
|
||||||
closeHandler(std::move(closeHandler))
|
closeHandler(std::move(closeHandler))
|
||||||
{
|
{
|
||||||
padAll(8);
|
|
||||||
|
|
||||||
// Save focus
|
// Save focus
|
||||||
Layer::push(this);
|
Layer::push(this);
|
||||||
|
|
||||||
auto carousel = new SelectFabCarousel(this);
|
auto box =
|
||||||
|
new Window(this, {(LCD_W - VM_W) / 2, (LCD_H - VM_H) / 2, VM_W, VM_H}, 0,
|
||||||
|
0, etx_modal_dialog_create);
|
||||||
|
box->padAll(8);
|
||||||
|
|
||||||
|
auto carousel = new SelectFabCarousel(box);
|
||||||
carousel->addButton(ICON_MODEL_SELECT, STR_MAIN_MENU_MANAGE_MODELS,
|
carousel->addButton(ICON_MODEL_SELECT, STR_MAIN_MENU_MANAGE_MODELS,
|
||||||
[=]() -> uint8_t {
|
[=]() -> uint8_t {
|
||||||
deleteLater();
|
deleteLater();
|
||||||
|
|||||||
Reference in New Issue
Block a user