Fix incorrect toolbar color on Qt 6.9+

Fixes #1685
This commit is contained in:
Cameron Gutman
2025-10-09 20:47:58 -05:00
parent 490aa5082f
commit 45989fdd6e

View File

@@ -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;