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}" />