fix(color): solid background for fullscreen warning dialogs (#5712)
This commit is contained in:
@@ -40,13 +40,11 @@ FullScreenDialog::FullScreenDialog(
|
|||||||
confirmHandler(confirmHandler)
|
confirmHandler(confirmHandler)
|
||||||
{
|
{
|
||||||
setWindowFlag(OPAQUE);
|
setWindowFlag(OPAQUE);
|
||||||
|
etx_solid_bg(lvobj, COLOR_THEME_WARNING_INDEX);
|
||||||
|
|
||||||
// In case alert raised while splash screen is showing.
|
// In case alert raised while splash screen is showing.
|
||||||
cancelSplash();
|
cancelSplash();
|
||||||
|
|
||||||
Window* p = Layer::back();
|
|
||||||
if (p) p->hide();
|
|
||||||
|
|
||||||
Layer::push(this);
|
Layer::push(this);
|
||||||
|
|
||||||
bringToTop();
|
bringToTop();
|
||||||
@@ -72,8 +70,7 @@ void FullScreenDialog::build()
|
|||||||
{
|
{
|
||||||
auto div = new Window(this, {0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT});
|
auto div = new Window(this, {0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT});
|
||||||
div->setWindowFlag(NO_FOCUS);
|
div->setWindowFlag(NO_FOCUS);
|
||||||
etx_bg_color(div->getLvObj(), COLOR_THEME_PRIMARY2_INDEX);
|
etx_solid_bg(div->getLvObj(), COLOR_THEME_PRIMARY2_INDEX);
|
||||||
etx_obj_add_style(div->getLvObj(), styles->bg_opacity_50, LV_PART_MAIN);
|
|
||||||
|
|
||||||
new StaticIcon(
|
new StaticIcon(
|
||||||
this, ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
this, ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||||
@@ -175,8 +172,8 @@ void FullScreenDialog::deleteLater(bool detach, bool trash)
|
|||||||
Layer::pop(this);
|
Layer::pop(this);
|
||||||
Window::deleteLater(detach, trash);
|
Window::deleteLater(detach, trash);
|
||||||
}
|
}
|
||||||
Window* p = Layer::back();
|
// Window* p = Layer::back();
|
||||||
if (p) p->show();
|
// if (p) p->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullScreenDialog::setMessage(std::string text)
|
void FullScreenDialog::setMessage(std::string text)
|
||||||
|
|||||||
Reference in New Issue
Block a user