Skip to content

Commit

Permalink
Update EqualPanel.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
qhy040404 authored and Arlodotexe committed Mar 22, 2024
1 parent 674ed5e commit 1eb0400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Segmented/src/EqualPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ protected override Size ArrangeOverride(Size finalSize)
{
double x = 0;

// Check if there's more width available - if so, recalculate (e.g. whenever Grid.Column is set to Auto)
// Check if there's more (little) width available - if so, set max item width to the maximum possible as we have an almost perfect height.
if (finalSize.Width > _visibleItemsCount * _maxItemWidth + (Spacing * (_visibleItemsCount - 1)))
{
MeasureOverride(finalSize);
maxItemWidth = (finalSize.Width - (Spacing * (visibleItemsCount - 1))) / visibleItemsCount;
}

var elements = Children.Where(static e => e.Visibility == Visibility.Visible);
Expand Down

0 comments on commit 1eb0400

Please sign in to comment.