mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Light/Dark mode override
This commit is contained in:
@@ -62,6 +62,16 @@ namespace GHelper.UI
|
|||||||
|
|
||||||
private static bool IsDarkTheme()
|
private static bool IsDarkTheme()
|
||||||
{
|
{
|
||||||
|
if (AppConfig.GetString("ui_mode").ToLower() == "dark")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AppConfig.GetString("ui_mode").ToLower() == "light")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
||||||
var registryValueObject = key?.GetValue("AppsUseLightTheme");
|
var registryValueObject = key?.GetValue("AppsUseLightTheme");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user