Skip to content

Commit b5d310d

Browse files
committed
Remove option to change settings window font
1 parent 93256fa commit b5d310d

File tree

6 files changed

+0
-75
lines changed

6 files changed

+0
-75
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ public void Initialize()
2727
{
2828
// Initialize dependency injection instances after Ioc.Default is created
2929
_stringMatcher = Ioc.Default.GetRequiredService<StringMatcher>();
30-
31-
// Initialize application resources after application is created
32-
var settingWindowFont = new FontFamily(SettingWindowFont);
33-
Application.Current.Resources["SettingWindowFont"] = settingWindowFont;
34-
Application.Current.Resources["ContentControlThemeFontFamily"] = settingWindowFont;
3530
}
3631

3732
public void Save()
@@ -108,25 +103,6 @@ public string Theme
108103
public bool ShowBadges { get; set; } = false;
109104
public bool ShowBadgesGlobalOnly { get; set; } = false;
110105

111-
private string _settingWindowFont { get; set; } = Win32Helper.GetSystemDefaultFont(false);
112-
public string SettingWindowFont
113-
{
114-
get => _settingWindowFont;
115-
set
116-
{
117-
if (_settingWindowFont != value)
118-
{
119-
_settingWindowFont = value;
120-
OnPropertyChanged();
121-
if (Application.Current != null)
122-
{
123-
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
124-
Application.Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(value);
125-
}
126-
}
127-
}
128-
}
129-
130106
public bool UseClock { get; set; } = true;
131107
public string TimeFormat { get; set; } = "hh:mm tt";
132108
public bool FirstLaunch { get; set; } = true;

Flow.Launcher/App.xaml.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () =>
163163
// So set to OnExplicitShutdown to prevent the application from shutting down before main window is created
164164
Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
165165

166-
// Update dynamic resources base on settings
167-
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
168-
Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);
169-
170166
Notification.Install();
171167

172168
// Enable Win32 dark mode if the system is in dark mode before creating all windows

Flow.Launcher/Languages/en.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@
282282
<system:String x:Key="userdatapathToolTip">User settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.</system:String>
283283
<system:String x:Key="userdatapathButton">Open Folder</system:String>
284284
<system:String x:Key="advanced">Advanced</system:String>
285-
<system:String x:Key="settingWindowFontTitle">Setting Window Font</system:String>
286285

287286
<!-- FileManager Setting Dialog -->
288287
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,6 @@ private void OnLoaded(object sender, RoutedEventArgs _)
239239
case nameof(Settings.KeepMaxResults):
240240
SetupResizeMode();
241241
break;
242-
case nameof(Settings.SettingWindowFont):
243-
InitializeContextMenu();
244-
break;
245242
case nameof(Settings.ShowHomePage):
246243
if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
247244
{

Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,4 @@ private static string BytesToReadableString(long bytes)
169169

170170
return "0 B";
171171
}
172-
173-
public string SettingWindowFont
174-
{
175-
get => _settings.SettingWindowFont;
176-
set
177-
{
178-
if (_settings.SettingWindowFont != value)
179-
{
180-
_settings.SettingWindowFont = value;
181-
OnPropertyChanged();
182-
}
183-
}
184-
}
185-
186-
[RelayCommand]
187-
private void ResetSettingWindowFont()
188-
{
189-
SettingWindowFont = Win32Helper.GetSystemDefaultFont(false);
190-
}
191172
}

Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -112,30 +112,6 @@
112112
</StackPanel>
113113
</cc:Card>
114114

115-
<cc:ExCard
116-
Title="{DynamicResource advanced}"
117-
Margin="0 14 0 0"
118-
Icon="&#xE8B7;">
119-
<StackPanel>
120-
<cc:Card
121-
Title="{DynamicResource settingWindowFontTitle}"
122-
Icon="&#xf259;"
123-
Type="Inside">
124-
<StackPanel Orientation="Horizontal">
125-
<Button Command="{Binding ResetSettingWindowFontCommand}" Content="{DynamicResource commonReset}" />
126-
<ComboBox
127-
Margin="12 8 0 8"
128-
HorizontalAlignment="Stretch"
129-
VerticalAlignment="Top"
130-
DisplayMemberPath="Source"
131-
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
132-
SelectedValue="{Binding SettingWindowFont, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
133-
SelectedValuePath="Source" />
134-
</StackPanel>
135-
</cc:Card>
136-
</StackPanel>
137-
</cc:ExCard>
138-
139115
<TextBlock
140116
Margin="14 20 0 0"
141117
HorizontalAlignment="Center"

0 commit comments

Comments
 (0)