Skip to content

Commit 84cd1a8

Browse files
committed
Remove extra code
1 parent b2f8ad9 commit 84cd1a8

File tree

1 file changed

+8
-31
lines changed

1 file changed

+8
-31
lines changed

Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class ThemeSelector
1616

1717
#region Theme Selection
1818

19-
// Theme select codes from SettingsPaneThemeViewModel.cs
19+
// Theme select codes simplified from SettingsPaneThemeViewModel.cs
2020

2121
private Theme.ThemeData _selectedTheme;
2222
private Theme.ThemeData SelectedTheme
@@ -28,36 +28,15 @@ private Theme.ThemeData SelectedTheme
2828
_theme.ChangeTheme(value.FileNameWithoutExtension);
2929

3030
if (_theme.BlurEnabled && _settings.UseDropShadowEffect)
31-
DropShadowEffect = false;
32-
}
33-
}
34-
35-
private List<Theme.ThemeData> Themes => _theme.LoadAvailableThemes();
36-
37-
private bool DropShadowEffect
38-
{
39-
get => _settings.UseDropShadowEffect;
40-
set
41-
{
42-
if (_theme.BlurEnabled && value)
43-
{
44-
_context.API.ShowMsgBox(_context.API.GetTranslation("shadowEffectNotAllowed"));
45-
return;
46-
}
47-
48-
if (value)
49-
{
50-
_theme.AddDropShadowEffectToCurrentTheme();
51-
}
52-
else
5331
{
5432
_theme.RemoveDropShadowEffectFromCurrentTheme();
33+
_settings.UseDropShadowEffect = false;
5534
}
56-
57-
_settings.UseDropShadowEffect = value;
5835
}
5936
}
6037

38+
private List<Theme.ThemeData> Themes => _theme.LoadAvailableThemes();
39+
6140
#endregion
6241

6342
public ThemeSelector(PluginInitContext context)
@@ -107,14 +86,12 @@ private Result CreateThemeResult(Theme.ThemeData theme, int score, IList<int> hi
10786
if (theme.IsDark == true)
10887
{
10988
description += _context.API.GetTranslation("TypeIsDarkToolTip");
110-
if (theme.HasBlur == true)
111-
{
112-
description += "";
113-
description += _context.API.GetTranslation("TypeHasBlurToolTip");
114-
}
11589
}
116-
else if (theme.HasBlur == true)
90+
91+
if (theme.HasBlur == true)
11792
{
93+
if (!string.IsNullOrEmpty(description))
94+
description += " ";
11895
description += _context.API.GetTranslation("TypeHasBlurToolTip");
11996
}
12097

0 commit comments

Comments
 (0)