From 97b6e1f1f7d778fde86dc45a48b49928c1627285 Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Thu, 16 May 2024 05:53:08 +0600 Subject: [PATCH] Re-add opening themes folder in theme settings pane --- .../ViewModels/SettingsPaneThemeViewModel.cs | 9 ++++++++- Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index ffcbceb11..7cd050333 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; +using CommunityToolkit.Mvvm.Input; using Flow.Launcher.Core.Resource; using Flow.Launcher.Helper; using Flow.Launcher.Infrastructure; @@ -15,7 +16,7 @@ using Flow.Launcher.ViewModel; namespace Flow.Launcher.SettingPages.ViewModels; -public class SettingsPaneThemeViewModel : BaseModel +public partial class SettingsPaneThemeViewModel : BaseModel { private CultureInfo Culture => CultureInfo.DefaultThreadCurrentCulture; @@ -364,6 +365,12 @@ public class SettingsPaneThemeViewModel : BaseModel public string ThemeImage => Constant.QueryTextBoxIconImagePath; + [RelayCommand] + private void OpenThemesFolder() + { + App.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); + } + public SettingsPaneThemeViewModel(Settings settings) { Settings = settings; diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml index f56367f96..8ba4d665c 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml @@ -726,8 +726,8 @@ MinWidth="180" Margin="0,0,18,0" HorizontalAlignment="Center" - Content="{DynamicResource OpenThemeFolder}" - DockPanel.Dock="Top" /> + Command="{Binding OpenThemesFolderCommand}" + Content="{DynamicResource OpenThemeFolder}" />