This repository was archived by the owner on Apr 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
src/Light Switch/Light Switch Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,14 @@ public void Reload()
43
43
44
44
private void SetLight ( )
45
45
{
46
- NotifyIcon . Icon = Resources . Icon_LightMode ;
47
-
48
46
var preferences = PreferencesService . GetPreferences ( ) ;
49
47
50
48
if ( preferences . IsAppThemeEnabled ) SetAppTheme ( true ) ;
51
- if ( preferences . IsSystemThemeEnabled ) SetSystemTheme ( true ) ;
49
+ if ( preferences . IsSystemThemeEnabled )
50
+ {
51
+ SetSystemTheme ( true ) ;
52
+ NotifyIcon . Icon = Resources . Icon_LightMode ;
53
+ }
52
54
if ( preferences . IsWallpaperEnabled )
53
55
{
54
56
if ( File . Exists ( preferences . LightWallpaperPath ) )
@@ -66,12 +68,14 @@ private void SetLight()
66
68
67
69
private void SetDark ( )
68
70
{
69
- NotifyIcon . Icon = Resources . Icon_DarkMode ;
70
-
71
71
var preferences = PreferencesService . GetPreferences ( ) ;
72
72
73
73
if ( preferences . IsAppThemeEnabled ) SetAppTheme ( false ) ;
74
- if ( preferences . IsSystemThemeEnabled ) SetSystemTheme ( false ) ;
74
+ if ( preferences . IsSystemThemeEnabled )
75
+ {
76
+ SetSystemTheme ( false ) ;
77
+ NotifyIcon . Icon = Resources . Icon_DarkMode ;
78
+ }
75
79
if ( preferences . IsWallpaperEnabled )
76
80
{
77
81
if ( File . Exists ( preferences . DarkWallpaperPath ) )
Original file line number Diff line number Diff line change @@ -97,13 +97,13 @@ public bool Equals(FileInfo x, FileInfo y)
97
97
_ => null ,
98
98
} ;
99
99
100
- public static readonly Storage Wallpapers = new ( nameof ( Wallpapers ) ) ;
101
-
102
100
/// <summary>
103
101
/// Path to LightSwitch storage in current user's temp folder.
104
102
/// </summary>
105
103
private static string BasePath { get ; } = Path . Combine ( Path . GetTempPath ( ) , "LightSwitch" ) ;
106
104
105
+ public static readonly Storage Wallpapers = new ( nameof ( Wallpapers ) ) ;
106
+
107
107
/// <summary>
108
108
/// Generates a unique string from current date and time.
109
109
/// </summary>
You can’t perform that action at this time.
0 commit comments