Re-add opening themes folder in theme settings pane

This commit is contained in:
Yusyuriv 2024-05-16 05:53:08 +06:00
parent e462457018
commit 97b6e1f1f7
No known key found for this signature in database
GPG key ID: A91C52E6F73148E0
2 changed files with 10 additions and 3 deletions

View file

@ -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;

View file

@ -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}" />
<TextBlock Style="{StaticResource Glyph}">
&#xe838;
</TextBlock>