GacUI_Layout\SharedSize

This commit is contained in:
Zihan Chen
2018-07-08 06:42:00 -07:00
parent d5b2598e91
commit 99ce18d723
14 changed files with 2806 additions and 13 deletions
+19 -9
View File
@@ -7482,7 +7482,7 @@ GuiSharedSizeItemComposition
if (parentRoot)
{
parentRoot->childItems.Remove(this);
parentRoot = 0;
parentRoot = nullptr;
}
auto current = GetParent();
@@ -7503,13 +7503,28 @@ GuiSharedSizeItemComposition
if (parentRoot)
{
parentRoot->childItems.Add(this);
Size minSize;
if (sharedWidth)
{
vint index = parentRoot->itemWidths.Keys().IndexOf(group);
if (index != -1)
{
minSize.x = parentRoot->itemWidths.Values()[index];
}
}
if (sharedHeight)
{
vint index = parentRoot->itemHeights.Keys().IndexOf(group);
if (index != -1)
{
minSize.y = parentRoot->itemHeights.Values()[index];
}
}
SetPreferredMinSize(minSize);
}
}
GuiSharedSizeItemComposition::GuiSharedSizeItemComposition()
:parentRoot(0)
, sharedWidth(false)
, sharedHeight(false)
{
SetMinSizeLimitation(GuiGraphicsComposition::LimitToElementAndChildren);
}
@@ -7619,11 +7634,6 @@ GuiSharedSizeRootComposition
}
}
void GuiSharedSizeRootComposition::UpdateBounds()
{
}
GuiSharedSizeRootComposition::GuiSharedSizeRootComposition()
{
}