fixed child removal

fixed relayout on draw
refactored child remove/replace into ScrollPanelWidget
fixed scrolling on child remove
This commit is contained in:
Sascha Biedermann
2013-03-19 17:39:07 +01:00
parent 770d79da0b
commit b6d09b8829
3 changed files with 43 additions and 25 deletions

View File

@@ -21,11 +21,10 @@ namespace OpenRA.Widgets
if (widget.Children.Count == 0)
widget.ContentHeight = widget.ItemSpacing;
w.Bounds.Y += widget.ContentHeight;
w.Bounds.Y = widget.ContentHeight;
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
}
public void AdjustChildren()
{
widget.ContentHeight = widget.ItemSpacing;