summaryrefslogtreecommitdiffstats
path: root/basicsuite
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2018-07-19 12:44:14 +0300
committerJuho Annunen <juho.annunen@qt.io>2018-07-19 10:36:28 +0000
commit83bffe92202f5cd7ed9ce642edebd617bb1c6303 (patch)
tree79abad2349dca4fc622ae2e9c83fe5d8b52ed647 /basicsuite
parent57bc95f418a0e42921bba984d35d5999c6a6cf8f (diff)
Move color definitions to QSettings
Task-number: QTBUG-69536 Change-Id: Ib18f19ce57266393e8d1c8ae8e7322e73ccafa53 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Diffstat (limited to 'basicsuite')
-rw-r--r--basicsuite/shared/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp
index 265092c..58ff00f 100644
--- a/basicsuite/shared/main.cpp
+++ b/basicsuite/shared/main.cpp
@@ -148,6 +148,17 @@ int main(int argc, char **argv)
applicationengine.rootContext()->setContextProperty("engine", &engine);
applicationengine.rootContext()->setContextProperty("appFont", appFont);
applicationengine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
+
+
+ QSettings themeColorSettings("QtLauncher", "colorSettings");
+
+ applicationengine.rootContext()->setContextProperty("_backgroundColor", themeColorSettings.value("backgroundColor", "#09102b"));
+ applicationengine.rootContext()->setContextProperty("_primaryGreen", themeColorSettings.value("primaryGreen", "#41cd52"));
+ applicationengine.rootContext()->setContextProperty("_mediumGreen", themeColorSettings.value("mediumGreen", "#21be2b"));
+ applicationengine.rootContext()->setContextProperty("_darkGreen", themeColorSettings.value("darkGreen", "#17a81a"));
+ applicationengine.rootContext()->setContextProperty("_primaryGrey", themeColorSettings.value("primaryGrey", "#9d9faa"));
+ applicationengine.rootContext()->setContextProperty("_secondaryGrey", themeColorSettings.value("secondaryGrey", "#3a4055"));
+
applicationengine.load(QUrl::fromLocalFile(path + "/SharedMain.qml"));
app.exec();