-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Theme responsive notification icons (#23)
- Loading branch information
1 parent
85a2778
commit c4fd544
Showing
16 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.Win32; | ||
|
||
namespace CommonHelpers | ||
{ | ||
public class WindowsDarkMode | ||
{ | ||
private static System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer() | ||
{ | ||
Interval = 1500 | ||
}; | ||
|
||
public static bool IsDarkModeEnabled { get; private set; } | ||
|
||
static WindowsDarkMode() | ||
{ | ||
|
||
IsDarkModeEnabled = FetchIsDarkModeEnabled(); | ||
|
||
timer.Tick += delegate{ IsDarkModeEnabled = FetchIsDarkModeEnabled(); }; | ||
timer.Start(); | ||
} | ||
|
||
private static bool FetchIsDarkModeEnabled() | ||
{ | ||
try | ||
{ | ||
string RegistryKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; | ||
int theme = (int?)Registry.GetValue(RegistryKey, "SystemUsesLightTheme", 1) ?? 1; | ||
return theme == 0; | ||
} | ||
catch | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+236 KB
(230%)
SteamController/Resources/microsoft-xbox-controller-white.ico
Binary file not shown.
Binary file not shown.
Binary file not shown.