Skip to content

Commit 31440a4

Browse files
committed
Revert: Gap changes
1 parent 7f7e660 commit 31440a4

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
<Grid.ColumnDefinitions>
229229
<ColumnDefinition Width="Auto" />
230230
<ColumnDefinition Width="*" />
231-
<ColumnDefinition x:Name="RightPaddingColumn" Width="{x:Bind PaddingColumnWidth, Mode=OneWay}" />
231+
<ColumnDefinition x:Name="RightPaddingColumn" Width="0" />
232232
</Grid.ColumnDefinitions>
233233

234234
<!-- Height is not divisble by four in order to properly align the button -->

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ public sealed partial class TabBar : BaseTabBar, INotifyPropertyChanged
2929

3030
private bool _lockDropOperation = false;
3131

32-
private static int _gap = 6;
33-
3432
// Starting position when dragging a tab
3533
private System.Drawing.Point dragStartPoint;
3634

@@ -54,14 +52,6 @@ public bool AllowTabsDrag
5452
public Rectangle DragArea
5553
=> DragAreaRectangle;
5654

57-
private GridLength _paddingColumnWidth;
58-
59-
public GridLength PaddingColumnWidth
60-
{
61-
get => _paddingColumnWidth;
62-
set => _paddingColumnWidth = new(value.Value + _gap);
63-
}
64-
6555
// Events
6656

6757
public static event EventHandler<TabBarItem?>? SelectedTabItemChanged;
@@ -77,10 +67,12 @@ public TabBar()
7767

7868
var appWindow = MainWindow.Instance.AppWindow;
7969

80-
PaddingColumnWidth =
81-
new(RealTimeLayoutService.FlowDirection is FlowDirection.RightToLeft
70+
double rightPaddingColumnWidth =
71+
RealTimeLayoutService.FlowDirection is FlowDirection.RightToLeft
8272
? appWindow.TitleBar.LeftInset
83-
: appWindow.TitleBar.RightInset);
73+
: appWindow.TitleBar.RightInset;
74+
75+
RightPaddingColumn.Width = new(rightPaddingColumnWidth >= 0 ? rightPaddingColumnWidth : 0);
8476

8577
AppearanceSettingsService.PropertyChanged += (s, e) =>
8678
{

0 commit comments

Comments
 (0)