Skip to content

Commit ed7e6d4

Browse files
committed
ux: remove Use fixed tab width in titlebar option from Preferences and makes it the only and default
Signed-off-by: leo <longshuang@msn.cn>
1 parent 2f3b825 commit ed7e6d4

File tree

5 files changed

+3
-19
lines changed

5 files changed

+3
-19
lines changed

src/Converters/BoolConverters.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ namespace SourceGit.Converters
55
{
66
public static class BoolConverters
77
{
8-
public static readonly FuncValueConverter<bool, double> ToPageTabWidth =
9-
new FuncValueConverter<bool, double>(x => x ? 200 : double.NaN);
10-
118
public static readonly FuncValueConverter<bool, FontWeight> IsBoldToFontWeight =
129
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
1310

src/Resources/Locales/en_US.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,6 @@
570570
<x:String x:Key="Text.Preferences.Appearance.Theme" xml:space="preserve">Theme</x:String>
571571
<x:String x:Key="Text.Preferences.Appearance.ThemeOverrides" xml:space="preserve">Theme Overrides</x:String>
572572
<x:String x:Key="Text.Preferences.Appearance.UseAutoHideScrollBars" xml:space="preserve">Use auto-hide scrollbars</x:String>
573-
<x:String x:Key="Text.Preferences.Appearance.UseFixedTabWidth" xml:space="preserve">Use fixed tab width in titlebar</x:String>
574573
<x:String x:Key="Text.Preferences.Appearance.UseNativeWindowFrame" xml:space="preserve">Use native window frame</x:String>
575574
<x:String x:Key="Text.Preferences.DiffMerge" xml:space="preserve">DIFF/MERGE TOOL</x:String>
576575
<x:String x:Key="Text.Preferences.DiffMerge.Path" xml:space="preserve">Install Path</x:String>

src/ViewModels/Preferences.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,6 @@ public int DateTimeFormat
148148
}
149149
}
150150

151-
public bool UseFixedTabWidth
152-
{
153-
get => _useFixedTabWidth;
154-
set => SetProperty(ref _useFixedTabWidth, value);
155-
}
156-
157151
public bool UseAutoHideScrollBars
158152
{
159153
get => _useAutoHideScrollBars;
@@ -718,7 +712,6 @@ private bool RemoveInvalidRepositoriesRecursive(List<RepositoryNode> collection)
718712

719713
private int _maxHistoryCommits = 20000;
720714
private int _subjectGuideLength = 50;
721-
private bool _useFixedTabWidth = true;
722715
private bool _useAutoHideScrollBars = true;
723716
private bool _useGitHubStyleAvatar = true;
724717
private bool _showAuthorTimeInGraph = false;

src/Views/LauncherTabBar.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
<ListBox.ItemTemplate>
4444
<DataTemplate DataType="vm:LauncherPage">
45-
<Border Width="{Binding Source={x:Static vm:Preferences.Instance}, Path=UseFixedTabWidth, Converter={x:Static c:BoolConverters.ToPageTabWidth}}" Height="30"
45+
<Border Width="200" Height="30"
4646
Padding="0,2,0,0"
4747
Background="Transparent"
4848
PointerPressed="OnPointerPressedTab"

src/Views/Preferences.axaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<TabItem.Header>
180180
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preferences.Appearance}"/>
181181
</TabItem.Header>
182-
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
182+
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
183183
<TextBlock Grid.Row="0" Grid.Column="0"
184184
Text="{DynamicResource Text.Preferences.Appearance.Theme}"
185185
HorizontalAlignment="Right"
@@ -277,16 +277,11 @@
277277
</TextBox>
278278

279279
<CheckBox Grid.Row="6" Grid.Column="1"
280-
Height="32"
281-
Content="{DynamicResource Text.Preferences.Appearance.UseFixedTabWidth}"
282-
IsChecked="{Binding UseFixedTabWidth, Mode=TwoWay}"/>
283-
284-
<CheckBox Grid.Row="7" Grid.Column="1"
285280
Height="32"
286281
Content="{DynamicResource Text.Preferences.Appearance.UseAutoHideScrollBars}"
287282
IsChecked="{Binding UseAutoHideScrollBars, Mode=TwoWay}"/>
288283

289-
<CheckBox Grid.Row="8" Grid.Column="1"
284+
<CheckBox Grid.Row="7" Grid.Column="1"
290285
Height="32"
291286
Content="{DynamicResource Text.Preferences.Appearance.UseNativeWindowFrame}"
292287
IsChecked="{Binding UseSystemWindowFrame, Mode=OneTime}"

0 commit comments

Comments
 (0)