mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve sys plugin theme selector
This commit is contained in:
parent
07c5fa4f5f
commit
2ed5de320a
2 changed files with 13 additions and 4 deletions
|
|
@ -56,6 +56,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
ThemeManager.Instance.RefreshFrame();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsBackdropEnabled
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
// Theme select codes simplified from SettingsPaneThemeViewModel.cs
|
||||
|
||||
private Theme.ThemeData _selectedTheme;
|
||||
private Theme.ThemeData SelectedTheme
|
||||
public Theme.ThemeData SelectedTheme
|
||||
{
|
||||
get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == _theme.CurrentTheme);
|
||||
set
|
||||
|
|
@ -27,11 +27,19 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
_selectedTheme = value;
|
||||
_theme.ChangeTheme(value.FileNameWithoutExtension);
|
||||
|
||||
if (_theme.BlurEnabled && _settings.UseDropShadowEffect)
|
||||
// when changed non-blur theme, change to backdrop to none
|
||||
if (!_theme.BlurEnabled)
|
||||
{
|
||||
_theme.RemoveDropShadowEffectFromCurrentTheme();
|
||||
_settings.UseDropShadowEffect = false;
|
||||
_settings.BackdropType = BackdropTypes.None;
|
||||
}
|
||||
|
||||
// dropshadow on and control disabled.(user can't change dropshadow with blur theme)
|
||||
if (_theme.BlurEnabled)
|
||||
{
|
||||
_settings.UseDropShadowEffect = true;
|
||||
}
|
||||
|
||||
_theme.RefreshFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue