mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
update to constants and change method name to OpenThemeFolder
This commit is contained in:
parent
9297bac72f
commit
83feb096c8
5 changed files with 13 additions and 13 deletions
|
|
@ -35,6 +35,10 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
public const string DefaultTheme = "Win11Light";
|
||||
|
||||
public const string Light = "Light";
|
||||
public const string Dark = "Dark";
|
||||
public const string System = "System";
|
||||
|
||||
public const string Themes = "Themes";
|
||||
public const string Settings = "Settings";
|
||||
public const string Logs = "Logs";
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using ContextMenuStrip = System.Windows.Forms.ContextMenuStrip;
|
|||
using DragEventArgs = System.Windows.DragEventArgs;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
using NotifyIcon = System.Windows.Forms.NotifyIcon;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
@ -480,16 +481,14 @@ namespace Flow.Launcher
|
|||
|
||||
public void InitializeDarkMode()
|
||||
{
|
||||
if (_settings.DarkMode == "Light")
|
||||
if (_settings.DarkMode == Constant.Light)
|
||||
{
|
||||
ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Light;
|
||||
}
|
||||
else if (_settings.DarkMode == "Dark")
|
||||
else if (_settings.DarkMode == Constant.Dark)
|
||||
{
|
||||
ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark;
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1949,7 +1949,7 @@
|
|||
Width="180"
|
||||
Margin="0,0,18,0"
|
||||
HorizontalAlignment="Center"
|
||||
Click="OpenPluginFolder"
|
||||
Click="OpenThemeFolder"
|
||||
Content="{DynamicResource OpenThemeFolder}"
|
||||
DockPanel.Dock="Top" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ namespace Flow.Launcher
|
|||
Close();
|
||||
}
|
||||
|
||||
private void OpenPluginFolder(object sender, RoutedEventArgs e)
|
||||
private void OpenThemeFolder(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Themes));
|
||||
}
|
||||
|
|
@ -277,7 +277,7 @@ namespace Flow.Launcher
|
|||
|
||||
private void OpenLogFolder(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Logs));
|
||||
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Logs, Constant.Version));
|
||||
}
|
||||
|
||||
private void OnPluginStoreRefreshClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -308,9 +308,9 @@ namespace Flow.Launcher
|
|||
|
||||
private void DarkModeSelectedIndexChanged(object sender, EventArgs e) => ThemeManager.Current.ApplicationTheme = settings.DarkMode switch
|
||||
{
|
||||
"Light" => ApplicationTheme.Light,
|
||||
"Dark" => ApplicationTheme.Dark,
|
||||
"System" => null,
|
||||
Constant.Light => ApplicationTheme.Light,
|
||||
Constant.Dark => ApplicationTheme.Dark,
|
||||
Constant.System => null,
|
||||
_ => ThemeManager.Current.ApplicationTheme
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,10 @@ using Flow.Launcher.Core.Plugin;
|
|||
using Flow.Launcher.Core.Resource;
|
||||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Image;
|
||||
using Flow.Launcher.Infrastructure.Storage;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using ApplicationTheme = ModernWpf.ApplicationTheme;
|
||||
|
||||
namespace Flow.Launcher.ViewModel
|
||||
{
|
||||
|
|
@ -387,7 +385,6 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public ResultsViewModel PreviewResults
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in a new issue