summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0346bf1..bf763e1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -36,6 +36,8 @@
#include <QtQml/QQmlApplicationEngine>
#include <QtQml/QQmlContext>
#include <QtQml/QQmlComponent>
+#include <QStandardPaths>
+#include <QIcon>
#include <QQuickStyle>
@@ -67,6 +69,12 @@ int main(int argc, char **argv)
{
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
+ qputenv("QT_QUICK_CONTROLS_CONF", "/data/user/qt/qtquickcontrols2/qtquickcontrols2.conf");
+ QIcon::setThemeSearchPaths(QStringList() << "/data/user/qt/qtquickcontrols2/icons");
+
+ QIcon::setThemeName("gallery");
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+
QApplication app(argc, argv);
app.setApplicationVersion(APPLICATION_VERSION);
@@ -105,6 +113,12 @@ int main(int argc, char **argv)
QtSquareImageProvider squareImageProvider;
QtImageMaskProvider imageMaskProvider;
+ QSettings styleSettings;
+ QString style = styleSettings.value("style").toString();
+ if (style.isEmpty() || style == "Default")
+ styleSettings.setValue("style", "Material");
+ QQuickStyle::setStyle(styleSettings.value("style").toString());
+
QSettings themeColorSettings("QtLauncher", "colorSettings");
engine.rootContext()->setContextProperty("_backgroundColor", themeColorSettings.value("backgroundColor", "#09102b"));