From cedf0c6c1ef6c03ca2feeb91d575d8aaaeffa764 Mon Sep 17 00:00:00 2001 From: DB p Date: Sat, 25 May 2024 16:16:02 +0900 Subject: [PATCH] - Add Reset Button Function - Fix Conflict --- Flow.Launcher/MainWindow.xaml | 1 + .../ViewModels/SettingsPaneThemeViewModel.cs | 24 +++++++++++++++++++ .../SettingPages/Views/SettingsPaneTheme.xaml | 2 +- .../Views/SettingsPaneTheme.xaml.cs | 5 ++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index ade997e20..f0f6c981e 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -521,6 +521,7 @@ + diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index bc96a86ff..2d04c49c3 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -470,4 +470,28 @@ public partial class SettingsPaneThemeViewModel : BaseModel { Settings = settings; } + + public void ResetCustomize() + { + Settings.QueryBoxFont = "Segoe UI"; + Settings.QueryBoxFontStyle = "Normal"; + Settings.QueryBoxFontWeight = "Normal"; + Settings.QueryBoxFontStretch = "Normal"; + Settings.QueryBoxFontSize = 20; + + Settings.ResultFont = "Segoe UI"; + Settings.ResultFontStyle = "Normal"; + Settings.ResultFontWeight = "Normal"; + Settings.ResultFontStretch = "Normal"; + Settings.ResultItemFontSize = 18; + + Settings.ResultSubFont = "Segoe UI"; + Settings.ResultSubFontStyle = "Normal"; + Settings.ResultSubFontWeight = "Normal"; + Settings.ResultSubFontStretch = "Normal"; + Settings.ResultSubItemFontSize = 14; + + Settings.ItemHeightSize = 52; + Settings.WindowHeightSize = 42; + } } diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml index c8425f822..8792a0e0a 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml @@ -255,7 +255,7 @@ Width="140" Margin="8" HorizontalAlignment="Center" - Content="{DynamicResource resetCustomize}" /> + Content="{DynamicResource resetCustomize}" Click="Reset_Click" /> diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs index 93cf7ad18..6132c452d 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs @@ -28,4 +28,9 @@ public partial class SettingsPaneTheme : Page { _viewModel.UpdateColorScheme(); } + + private void Reset_Click(object sender, System.Windows.RoutedEventArgs e) + { + _viewModel.ResetCustomize(); + } }