From 951184925f60c647fc9dcadd14548017d8fbb197 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sat, 16 Mar 2024 23:42:41 +0800 Subject: [PATCH] fix: fix separator visibility. --- src/Ursa/Controls/ToolBar/ToolBarPanel.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Ursa/Controls/ToolBar/ToolBarPanel.cs b/src/Ursa/Controls/ToolBar/ToolBarPanel.cs index df3971d..6b547bc 100644 --- a/src/Ursa/Controls/ToolBar/ToolBarPanel.cs +++ b/src/Ursa/Controls/ToolBar/ToolBarPanel.cs @@ -100,16 +100,13 @@ public class ToolBarPanel: StackPanel protected override Size ArrangeOverride(Size finalSize) { - //Children.Clear(); - //OverflowPanel?.Children.Clear(); var logicalChildren = _parent?.GetLogicalChildren().OfType().ToList(); - List thisPanel = new List(); - List thatPanel = new List(); if(logicalChildren is null) return finalSize; bool overflow = false; for (int i = 0; i < logicalChildren.Count; i++) { var child = logicalChildren[i]; + if(child is ToolBarSeparator s) s.IsVisible = true; var isItemOverflow = ToolBar.GetIsOverflowItem(child); if(isItemOverflow) overflow = true; if (Children?.Contains(child) == true)