Dynamic zones working
This commit is contained in:
@@ -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] = {};
|
||||
|
||||
Reference in New Issue
Block a user