fix(widget): update layout before computing main zone
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user