feat: add separator support, fix various issues.

This commit is contained in:
rabbitism
2024-02-23 17:51:05 +08:00
parent 1ccb395ab0
commit 0965f9d1f8
9 changed files with 127 additions and 7 deletions

View File

@@ -116,8 +116,24 @@ public class ToolBarPanel: StackPanel
{
Children.Add(child);
}
if (child is ToolBarSeparator s)
{
s.IsVisible = true;
}
}
var thisLast = this.Children.LastOrDefault();
if (thisLast is ToolBarSeparator s2)
{
s2.IsVisible = false;
}
var thatFirst = OverflowPanel?.Children.FirstOrDefault();
if (thatFirst is ToolBarSeparator s3)
{
s3.IsVisible = false;
}
if (_parent != null) _parent.HasOverflowItems = overflow;
return base.ArrangeOverride(finalSize);
}