fix(color): Firmware update progress text stuck at device reset (#3704)
* fixes #3695 flash progress * move init() to where it belongs (constructor)
This commit is contained in:
@@ -45,6 +45,9 @@ FullScreenDialog::FullScreenDialog(
|
|||||||
Layer::push(this);
|
Layer::push(this);
|
||||||
|
|
||||||
bringToTop();
|
bringToTop();
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
lv_obj_add_event_cb(lvobj, FullScreenDialog::long_pressed, LV_EVENT_LONG_PRESSED, nullptr);
|
lv_obj_add_event_cb(lvobj, FullScreenDialog::long_pressed, LV_EVENT_LONG_PRESSED, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,8 +108,6 @@ void FullScreenDialog::init()
|
|||||||
|
|
||||||
void FullScreenDialog::paint(BitmapBuffer * dc)
|
void FullScreenDialog::paint(BitmapBuffer * dc)
|
||||||
{
|
{
|
||||||
init();
|
|
||||||
|
|
||||||
OpenTxTheme::instance()->drawBackground(dc);
|
OpenTxTheme::instance()->drawBackground(dc);
|
||||||
|
|
||||||
dc->drawFilledRect(0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT, SOLID,
|
dc->drawFilledRect(0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT, SOLID,
|
||||||
@@ -175,6 +176,11 @@ void FullScreenDialog::deleteLater(bool detach, bool trash)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FullScreenDialog::setMessage(std::string text)
|
||||||
|
{
|
||||||
|
messageLabel->setText(text);
|
||||||
|
}
|
||||||
|
|
||||||
static void run_ui_manually()
|
static void run_ui_manually()
|
||||||
{
|
{
|
||||||
checkBacklight();
|
checkBacklight();
|
||||||
|
|||||||
@@ -48,11 +48,7 @@ class FullScreenDialog : public Window
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setMessage(std::string text)
|
void setMessage(std::string text);
|
||||||
{
|
|
||||||
message = std::move(text);
|
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void paint(BitmapBuffer * dc) override;
|
void paint(BitmapBuffer * dc) override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user