From 45989fdd6e3ff4c28dbf29c724ab2c8ae5deb3ba Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 9 Oct 2025 20:47:58 -0500 Subject: [PATCH] Fix incorrect toolbar color on Qt 6.9+ Fixes #1685 --- app/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 8c1608ab..db19a8c9 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -744,6 +744,12 @@ int main(int argc, char *argv[]) if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MATERIAL_VARIANT")) { qputenv("QT_QUICK_CONTROLS_MATERIAL_VARIANT", "Dense"); } + if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MATERIAL_PRIMARY")) { + // Qt 6.9 began to use a different shade of Material.Indigo when we use a dark theme + // (which is all the time). The new color looks washed out, so manually specify the + // old primary color unless the user overrides it themselves. + qputenv("QT_QUICK_CONTROLS_MATERIAL_PRIMARY", "#3F51B5"); + } QQmlApplicationEngine engine; QString initialView;