diff --git a/Import/GacUI.cpp b/Import/GacUI.cpp index 982b2c5e..95e95f4b 100644 --- a/Import/GacUI.cpp +++ b/Import/GacUI.cpp @@ -1535,6 +1535,13 @@ GuiDialogBase return dynamic_cast(host); } } + else if (auto composition = dynamic_cast(rootObject)) + { + if (auto host = composition->GetRelatedControlHost()) + { + return dynamic_cast(host); + } + } } return nullptr; } @@ -4409,7 +4416,6 @@ GuiPopup INativeWindow* window=GetNativeWindow(); if(window) { - Size size=window->GetBounds().GetSize(); Rect bounds(Point(0, 0), control->GetBoundsComposition()->GetBounds().GetSize()); ShowPopup(control, bounds, preferredTopBottomSide); } @@ -33665,6 +33671,12 @@ GuiFlowComposition alignment = value; needUpdate = true; } + + void GuiFlowComposition::ForceCalculateSizeImmediately() + { + GuiBoundsComposition::ForceCalculateSizeImmediately(); + UpdateFlowItemBounds(true); + } Size GuiFlowComposition::GetMinPreferredClientSize() { @@ -34179,6 +34191,12 @@ GuiStackComposition padding = value; EnsureStackItemVisible(); } + + void GuiStackComposition::ForceCalculateSizeImmediately() + { + GuiBoundsComposition::ForceCalculateSizeImmediately(); + UpdateStackItemBounds(); + } Size GuiStackComposition::GetMinPreferredClientSize() { diff --git a/Import/GacUI.h b/Import/GacUI.h index 96c5823a..80f8b1f2 100644 --- a/Import/GacUI.h +++ b/Import/GacUI.h @@ -6886,7 +6886,8 @@ Stack Compositions /// Set the stack item padding. /// The stack item padding. void SetPadding(vint value); - + + void ForceCalculateSizeImmediately()override; Size GetMinPreferredClientSize()override; Rect GetBounds()override; @@ -7200,7 +7201,8 @@ Flow Compositions /// Set the alignment for rows. /// The alignment. void SetAlignment(FlowAlignment value); - + + void ForceCalculateSizeImmediately()override; Size GetMinPreferredClientSize()override; Rect GetBounds()override; };