From 83bffe92202f5cd7ed9ce642edebd617bb1c6303 Mon Sep 17 00:00:00 2001 From: Juho Annunen Date: Thu, 19 Jul 2018 12:44:14 +0300 Subject: Move color definitions to QSettings Task-number: QTBUG-69536 Change-Id: Ib18f19ce57266393e8d1c8ae8e7322e73ccafa53 Reviewed-by: Kimmo Ollila --- basicsuite/shared/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(); -- cgit v1.2.3