aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/main.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2022-12-02 16:45:40 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2022-12-02 16:05:33 +0000
commit5649fc30caf5ae32164b859d058d91802d3a0efc (patch)
tree452e3bfc222359bdfc4a5f6213be8407aa38b31d /src/app/main.cpp
parent1755f208fb16ed91f420a40ab42c506cce7dd9c6 (diff)
main: Prevent GTK3 platform theme plugin from enforcing a dark palette
Fixes: QTCREATORBUG-28497 Change-Id: Ib49b57aafe044d711940db3ea0e0778206221111 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/app/main.cpp')
-rw-r--r--src/app/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index e197f17393..bdd80ed34e 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -494,6 +494,11 @@ int main(int argc, char **argv)
qputenv("QT_ENABLE_REGEXP_JIT", "0");
}
+ if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("GTK_THEME"))
+ // Work around QTCREATORBUG-28497:
+ // Prevent Qt's GTK3 platform theme plugin from enforcing a dark palette
+ qputenv("GTK_THEME", ":light");
+
#if defined(QTC_FORCE_XCB)
if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("QT_QPA_PLATFORM")) {
// Enforce XCB on Linux/Gnome, if the user didn't override via QT_QPA_PLATFORM