fix(widget): update layout before computing main zone

This commit is contained in:
Raphael Coeffic
2022-06-12 19:11:54 +02:00
parent 7e50b2f948
commit efb33ff1af
2 changed files with 3 additions and 3 deletions
@@ -106,9 +106,6 @@ void Layout::adjustLayout()
// and update relevant windows
updateZones();
// probably not needed
//invalidate();
}
rect_t Layout::getMainZone() const
@@ -98,6 +98,9 @@ void ViewMainDecoration::setFlightModeVisible(bool visible)
rect_t ViewMainDecoration::getMainZone() const
{
// update layout first
lv_obj_update_layout(parent->getLvObj());
auto x_left = lv_obj_get_x2(w_ml->getLvObj()) + 1;
auto x_right = lv_obj_get_x(w_mr->getLvObj());