summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--resources/res.qrc5
-rw-r--r--resources/styles/nheko-dark.qss77
-rw-r--r--resources/styles/nheko.qss68
-rw-r--r--resources/styles/system.qss39
-rw-r--r--src/UserSettingsPage.cpp17
5 files changed, 2 insertions, 204 deletions
diff --git a/resources/res.qrc b/resources/res.qrc
index 841f956e..ed32b2bf 100644
--- a/resources/res.qrc
+++ b/resources/res.qrc
@@ -90,11 +90,6 @@
         <file>nheko-32.png</file>
         <file>nheko-16.png</file>
     </qresource>
-    <qresource prefix="/styles">
-        <file>styles/system.qss</file>
-        <file>styles/nheko.qss</file>
-        <file>styles/nheko-dark.qss</file>
-    </qresource>
     <qresource prefix="/">
         <file>qtquickcontrols2.conf</file>
         <file>qml/Root.qml</file>
diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss
deleted file mode 100644
index 597397cd..00000000
--- a/resources/styles/nheko-dark.qss
+++ /dev/null
@@ -1,77 +0,0 @@
-TextLabel,
-QLabel {
-    color: #caccd1;
-}
-
-TextLabel::a {
-    color: #38a3d8;
-}
-
-QuickSwitcher,
-ReplyPopup,
-SuggestionsPopup,
-UserSettingsPage,
-#scroll_widget,
-#UserSettingScrollWidget {
-    background-color: #202228;
-}
-
-QLineEdit,
-EditModal,
-dialogs--ReCaptcha,
-dialogs--JoinRoom {
-    background-color: #202228;
-    color: #caccd1;
-}
-
-PopupItem {
-    background-color: #202228;
-    qproperty-hoverColor: rgba(45, 49, 57, 120);
-}
-
-FlatButton {
-    qproperty-foregroundColor: #727274;
-    qproperty-backgroundColor: #333;
-    qproperty-disabledForegroundColor: #222;
-}
-
-RaisedButton {
-    qproperty-foregroundColor: #caccd1;
-    qproperty-backgroundColor: #333;
-}
-
-FloatingButton {
-    qproperty-backgroundColor: #2d3139;
-    qproperty-foregroundColor: white;
-}
-
-TextField {
-    qproperty-backgroundColor: #202228;
-    qproperty-inkColor: #caccd1;
-    qproperty-labelColor: #caccd1;
-}
-
-TextInputWidget {
-    border: none;
-}
-
-TextInputWidget,
-TextInputWidget > QTextEdit,
-TextInputWidget > QLineEdit {
-    background-color: #2d3139;
-    color: #caccd1;
-}
-
-Toggle {
-    qproperty-activeColor: #38a3d8;
-    qproperty-disabledColor: gray;
-    qproperty-inactiveColor: gray;
-    qproperty-trackColor: rgb(240, 240, 240);
-}
-
-QListWidget {
-    color: #caccd1;
-    background-color: #202228;
-}
-
-QSplitter::handle { image: none; }
diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss
deleted file mode 100644
index b4b7d427..00000000
--- a/resources/styles/nheko.qss
+++ /dev/null
@@ -1,68 +0,0 @@
-TextLabel,
-QLabel {
-    color: #333;
-}
-
-TextLabel::a {
-    color: #0077b5;
-}
-
-
-PopupItem {
-    background-color: white;
-    qproperty-hoverColor: rgba(192, 193, 195, 120);
-}
-
-FlatButton {
-    qproperty-foregroundColor: #495057;
-}
-
-RaisedButton {
-    qproperty-foregroundColor: white;
-}
-
-dialogs--ReCaptcha,
-dialogs--JoinRoom,
-EditModal,
-QListWidget {
-    background-color: white;
-    color: #495057;
-}
-
-QComboBox,
-QPushButton {
-    background-color: white;
-    color: #333;
-}
-
-FloatingButton {
-    qproperty-backgroundColor: #efefef;
-    qproperty-foregroundColor: black;
-}
-
-TextField {
-    qproperty-backgroundColor: white;
-    qproperty-inkColor: #333;
-    qproperty-labelColor: #333;
-}
-
-QListWidget,
-TextInputWidget,
-QTextEdit,
-QLineEdit {
-    background-color: white;
-    color: #333;
-}
-
-TextInputWidget {
-    border: none;
-}
-
-Toggle {
-    qproperty-activeColor: #38a3d8;
-    qproperty-disabledColor: gray;
-    qproperty-inactiveColor: gray;
-    qproperty-trackColor: rgb(240, 240, 240);
-}
-
-QSplitter::handle { image: none; }
diff --git a/resources/styles/system.qss b/resources/styles/system.qss
deleted file mode 100644
index d2305974..00000000
--- a/resources/styles/system.qss
+++ /dev/null
@@ -1,39 +0,0 @@
-TextInputWidget {
-    border: none;
-}
-
-PopupItem {
-    qproperty-hoverColor: palette(base);
-}
-
-FlatButton {
-    qproperty-foregroundColor: palette(text);
-}
-
-RaisedButton {
-    qproperty-foregroundColor: palette(button-text);
-}
-
-TextField {
-    qproperty-backgroundColor: palette(window);
-}
-
-QTextEdit,
-QLineEdit,
-QListWidget {
-    background-color: palette(window);
-}
-
-FloatingButton {
-    qproperty-backgroundColor: palette(base);
-    qproperty-foregroundColor: palette(text);
-}
-
-Toggle {
-    qproperty-activeColor: palette(highlight);
-    qproperty-disabledColor: palette(dark);
-    qproperty-inactiveColor: palette(mid);
-    qproperty-trackColor: palette(base);
-}
-
-QSplitter::handle { image: none; }
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index 7e7cead3..84453962 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -852,21 +852,8 @@ UserSettings::setOpenVideoExternal(bool state)
 void
 UserSettings::applyTheme()
 {
-    QFile stylefile;
-
-    if (this->theme() == QLatin1String("light")) {
-        stylefile.setFileName(QStringLiteral(":/styles/styles/nheko.qss"));
-    } else if (this->theme() == QLatin1String("dark")) {
-        stylefile.setFileName(QStringLiteral(":/styles/styles/nheko-dark.qss"));
-    } else {
-        stylefile.setFileName(QStringLiteral(":/styles/styles/system.qss"));
-    }
-    QApplication::setPalette(Theme::paletteFromTheme(this->theme()));
-
-    stylefile.open(QFile::ReadOnly);
-    QString stylesheet = QString(stylefile.readAll());
-
-    qobject_cast<QApplication *>(QApplication::instance())->setStyleSheet(stylesheet);
+  QGuiApplication::setPalette(Theme::paletteFromTheme(this->theme()));
+  QApplication::setPalette(Theme::paletteFromTheme(this->theme()));
 }
 
 void