Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-11-24 17:39:20 +0300
committerHannah von Reth <vonreth@kde.org>2020-12-01 13:06:39 +0300
commit12ad099bb9e6a87ea5622f2932deb1df6ab37482 (patch)
tree827d47031ffdfba8fa66439bf4bfc764efdda291
parentf6295918bf2845460fbfa6099c9c750d1e436077 (diff)
Fix theme detection on Windows 10
Fixes: #8244
-rw-r--r--changelog/unreleased/82446
-rw-r--r--src/common/utility_win.cpp10
2 files changed, 15 insertions, 1 deletions
diff --git a/changelog/unreleased/8244 b/changelog/unreleased/8244
new file mode 100644
index 000000000..f403b0a7c
--- /dev/null
+++ b/changelog/unreleased/8244
@@ -0,0 +1,6 @@
+Bugfix: Correctly detect Windows 10 taskbar theme
+
+We fixed the detection of a dark system try theme on
+Windows.
+
+https://github.com/owncloud/client/issues/8244
diff --git a/src/common/utility_win.cpp b/src/common/utility_win.cpp
index 699821904..71d293550 100644
--- a/src/common/utility_win.cpp
+++ b/src/common/utility_win.cpp
@@ -41,7 +41,14 @@ const QString systemRunPathC() {
const QString runPathC() {
return QStringLiteral("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run");
}
+
+const QString systemThemesC()
+{
+ return QStringLiteral("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize");
}
+
+}
+
namespace OCC {
static void setupFavLink_private(const QString &folder)
@@ -107,7 +114,8 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
static inline bool hasDarkSystray_private()
{
- return true;
+ const QSettings settings(systemThemesC(), QSettings::NativeFormat);
+ return !settings.value(QStringLiteral("SystemUsesLightTheme"), false).toBool();
}
QVariant Utility::registryGetKeyValue(HKEY hRootKey, const QString &subKey, const QString &valueName)