summaryrefslogtreecommitdiffstats
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc
index 9ca1d5de..7338e578 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -75,15 +75,25 @@ main(int argc, char *argv[])
QFile stylefile;
- if (!settings.contains("user/theme")) {
- settings.setValue("user/theme", "default");
- }
+ if (!settings.contains("user/theme"))
+ settings.setValue("user/theme", "light");
+
+ const auto theme = settings.value("user/theme", "light").toString();
+
+ QPalette pal;
- if (settings.value("user/theme").toString() == "default") {
+ if (theme == "light") {
stylefile.setFileName(":/styles/styles/nheko.qss");
+ pal.setColor(QPalette::Link, QColor("#333"));
+ } else if (theme == "dark") {
+ stylefile.setFileName(":/styles/styles/nheko-dark.qss");
+ pal.setColor(QPalette::Link, QColor("#d7d9dc"));
} else {
stylefile.setFileName(":/styles/styles/system.qss");
}
+
+ app.setPalette(pal);
+
stylefile.open(QFile::ReadOnly);
QString stylesheet = QString(stylefile.readAll());