Skip to content

Commit 9918dfb

Browse files
committed
Fix: Prevention of incorrect sizing
1 parent d934b93 commit 9918dfb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Files.App/UserControls/TabBar/TabBar.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,10 @@ private void TabViewItem_Loaded(object sender, RoutedEventArgs e)
376376
}
377377

378378
private void DragAreaRectangle_Loaded(object sender, RoutedEventArgs e)
379-
=> HorizontalTabView.Measure(new(HorizontalTabView.ActualWidth - TabBarAddNewTabButton.Width - TitleBarWidth.Value, HorizontalTabView.ActualHeight));
379+
{
380+
var width = HorizontalTabView.ActualWidth - TabBarAddNewTabButton.Width - TitleBarWidth.Value;
381+
var height = HorizontalTabView.ActualHeight;
382+
HorizontalTabView.Measure(new(width >= 0 ? width : 0, height >= 0 ? height : 0));
383+
}
380384
}
381385
}

0 commit comments

Comments
 (0)