diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/citra_qt/configuration/config.cpp | 2 | ||||
-rw-r--r-- | src/citra_qt/ui_settings.h | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index 64ffc9152..b7b129fe0 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -134,6 +134,7 @@ void Config::ReadValues() { qt_config->endGroup(); qt_config->beginGroup("UI"); + UISettings::values.theme = qt_config->value("theme", UISettings::themes[0].second).toString(); qt_config->beginGroup("UILayout"); UISettings::values.geometry = qt_config->value("geometry").toByteArray(); @@ -269,6 +270,7 @@ void Config::SaveValues() { qt_config->endGroup(); qt_config->beginGroup("UI"); + qt_config->setValue("theme", UISettings::values.theme); qt_config->beginGroup("UILayout"); qt_config->setValue("geometry", UISettings::values.geometry); diff --git a/src/citra_qt/ui_settings.h b/src/citra_qt/ui_settings.h index bc37f81c5..025c73f84 100644 --- a/src/citra_qt/ui_settings.h +++ b/src/citra_qt/ui_settings.h @@ -4,6 +4,7 @@ #pragma once +#include <array> #include <vector> #include <QByteArray> #include <QString> @@ -14,6 +15,10 @@ namespace UISettings { using ContextualShortcut = std::pair<QString, int>; using Shortcut = std::pair<QString, ContextualShortcut>; +static const std::array<std::pair<QString, QString>, 2> themes = { + {std::make_pair(QString("Default"), QString("default")), + std::make_pair(QString("Dark"), QString("qdarkstyle"))}}; + struct Values { QByteArray geometry; QByteArray state; @@ -39,6 +44,8 @@ struct Values { bool gamedir_deepscan; QStringList recent_files; + QString theme; + // Shortcut name <Shortcut, context> std::vector<Shortcut> shortcuts; }; |