Sizing fixes
This commit is contained in:
parent
a36386cc20
commit
c94f5144e7
4 changed files with 20 additions and 11 deletions
|
|
@ -16,6 +16,7 @@ void RootWidget::processFrame(EventHandler* events, const RectF& screenArea) {
|
|||
|
||||
if (mDebug) {
|
||||
mScreenArea.size -= { 400, 0 };
|
||||
events->setEnableKeyEvents(true);
|
||||
if (events->isPressed(InputID::K)) mDebugStopProcessing = !mDebugStopProcessing;
|
||||
if (mDebugStopProcessing) return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,10 @@ void Widget::adjustLayout(bool vertical) {
|
|||
Vec2F availableSize = getRelativeAreaT().size;
|
||||
|
||||
for (auto child : mChildren) {
|
||||
if (child->mSizePolicy[!vertical] != SizePolicy::Minimal) {
|
||||
child->pickRect();
|
||||
}
|
||||
|
||||
if (child->mSizePolicy[vertical] == SizePolicy::Expanding) {
|
||||
contributors.emplace_back( child, true );
|
||||
|
||||
|
|
@ -217,8 +221,6 @@ void Widget::adjustLayout(bool vertical) {
|
|||
child->setAreaCache(area);
|
||||
child->clampRect();
|
||||
|
||||
} else {
|
||||
// child->triggerWidgetUpdate("expand child in layout");
|
||||
}
|
||||
contentSize += child->getAreaCache().size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue