Dynamic zones working

This commit is contained in:
Raphael Coeffic
2021-04-18 07:57:41 +02:00
parent 9a0f609ff7
commit 99018ce726
2 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -124,7 +124,10 @@ void Layout::decorate()
// Re-compute positions
viewMain->adjustDecoration();
viewMain->invalidate();
// and update relevant windows
updateZones();
invalidate();
}
rect_t Layout::getMainZone() const
@@ -122,6 +122,15 @@ class WidgetsContainer: public FormGroup, public WidgetsContainerInterface
}
}
void updateZones()
{
for (int i = 0; i < N; i++) {
if (widgets[i]) {
widgets[i]->setRect(getZone(i));
}
}
}
protected:
PersistentData * persistentData;
Widget * widgets[N] = {};