summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2021-01-23 21:24:37 +0000
committersr55 <[email protected]>2021-01-23 21:24:37 +0000
commit781749e9634b7fd4468d1c456c0059f80c06a404 (patch)
tree9310617f88b0d076b129f8b5e3d2f2ca1e63a218 /win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
parenta97930bcc92ff088c38c438802f902063b5b9cfd (diff)
WinGui: Extend the dark theme option to be able to honour OS "AppsUseLightTheme" setting. #3369
Diffstat (limited to 'win/CS/HandBrakeWPF/Utilities/SystemInfo.cs')
-rw-r--r--win/CS/HandBrakeWPF/Utilities/SystemInfo.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs b/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
index e1452910a..ece1bdd34 100644
--- a/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
+++ b/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
@@ -149,5 +149,16 @@ namespace HandBrakeWPF.Utilities
return false;
}
+
+ public static bool IsAppsUsingDarkTheme()
+ {
+ object value = Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme", null);
+ if (value != null)
+ {
+ return (int)value != 1;
+ }
+
+ return false;
+ }
}
}