diff --git a/include/UserSettingsPage.h b/include/UserSettingsPage.h
index 9e47254f80ff41f17fe96c68173cdee418e07266..99a149c6626dca6de2b2d0e1cb79cdd65e987a3b 100644
--- a/include/UserSettingsPage.h
+++ b/include/UserSettingsPage.h
@@ -36,8 +36,9 @@ public:
 
         void save();
         void load();
-        void setTheme(QString theme) { theme_ = theme; }
-        void setTray(bool state) { isTrayEnabled_ = state; }
+        void applyTheme();
+        void setTheme(QString theme);
+        void setTray(bool state);
 
         QString theme() const { return !theme_.isEmpty() ? theme_ : "light"; }
         bool isTrayEnabled() const { return isTrayEnabled_; }
diff --git a/src/UserSettingsPage.cc b/src/UserSettingsPage.cc
index 79f8f7bd76ff26f2e2057d27cccedf40797508d7..a5851c57b6e3c63197b5a39e105a9382b3a4acdd 100644
--- a/src/UserSettingsPage.cc
+++ b/src/UserSettingsPage.cc
@@ -15,6 +15,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <QApplication>
 #include <QComboBox>
 #include <QDebug>
 #include <QLabel>
@@ -33,7 +34,46 @@ UserSettings::load()
 {
         QSettings settings;
         isTrayEnabled_ = settings.value("user/window/tray", true).toBool();
-        theme_         = settings.value("user/theme", "default").toString();
+        theme_         = settings.value("user/theme", "light").toString();
+
+        applyTheme();
+}
+
+void
+UserSettings::setTheme(QString theme)
+{
+        theme_ = theme;
+        save();
+        applyTheme();
+}
+
+void
+UserSettings::setTray(bool state)
+{
+        isTrayEnabled_ = state;
+        save();
+}
+void
+UserSettings::applyTheme()
+{
+        QFile stylefile;
+        QPalette pal;
+
+        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");
+        }
+
+        stylefile.open(QFile::ReadOnly);
+        QString stylesheet = QString(stylefile.readAll());
+
+        QApplication::setPalette(pal);
+        qobject_cast<QApplication *>(QApplication::instance())->setStyleSheet(stylesheet);
 }
 
 void
diff --git a/src/main.cc b/src/main.cc
index 7338e5780f7f6d56454da4f4f6ee69596b65c9da..89731ec7ea94ca843a5b3e2f3acff142aed94d53 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -73,31 +73,6 @@ main(int argc, char *argv[])
 
         QSettings settings;
 
-        QFile stylefile;
-
-        if (!settings.contains("user/theme"))
-                settings.setValue("user/theme", "light");
-
-        const auto theme = settings.value("user/theme", "light").toString();
-
-        QPalette pal;
-
-        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());
-
-        app.setStyleSheet(stylesheet);
         // Set the default if a value has not been set.
         if (settings.value("font/size").toInt() == 0)
                 settings.setValue("font/size", 12);