widget: fullscreen mode opaque LVGL object

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 5d08eb45d4
commit f229750e61
+2
View File
@@ -130,6 +130,7 @@ void Widget::setFullscreen(bool enable)
// Reset all zones in container
Widget::update();
setWindowFlags(getWindowFlags() & ~OPAQUE);
lv_obj_set_style_bg_opa(lvobj, LV_OPA_0, LV_PART_MAIN);
// and give up focus
ViewMain::instance()->enableTopbar();
@@ -141,6 +142,7 @@ void Widget::setFullscreen(bool enable)
// Set window opaque (inhibits redraw from windows bellow)
setWindowFlags(getWindowFlags() | OPAQUE);
lv_obj_set_style_bg_opa(lvobj, LV_OPA_MAX, LV_PART_MAIN);
setRect(parent->getRect());
fullscreen = true;
ViewMain::instance()->disableTopbar();