yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

citra-qt: add new uisetting->theme

This commit is contained in:
Kloen 2017-06-24 02:35:17 +02:00
parent 6d436d7a52
commit bbeb9f1dbb
2 changed files with 9 additions and 0 deletions

View File

@ -134,6 +134,7 @@ void Config::ReadValues() {
qt_config->endGroup(); qt_config->endGroup();
qt_config->beginGroup("UI"); qt_config->beginGroup("UI");
UISettings::values.theme = qt_config->value("theme", UISettings::themes[0].second).toString();
qt_config->beginGroup("UILayout"); qt_config->beginGroup("UILayout");
UISettings::values.geometry = qt_config->value("geometry").toByteArray(); UISettings::values.geometry = qt_config->value("geometry").toByteArray();
@ -269,6 +270,7 @@ void Config::SaveValues() {
qt_config->endGroup(); qt_config->endGroup();
qt_config->beginGroup("UI"); qt_config->beginGroup("UI");
qt_config->setValue("theme", UISettings::values.theme);
qt_config->beginGroup("UILayout"); qt_config->beginGroup("UILayout");
qt_config->setValue("geometry", UISettings::values.geometry); qt_config->setValue("geometry", UISettings::values.geometry);

View File

@ -4,6 +4,7 @@
#pragma once #pragma once
#include <array>
#include <vector> #include <vector>
#include <QByteArray> #include <QByteArray>
#include <QString> #include <QString>
@ -14,6 +15,10 @@ namespace UISettings {
using ContextualShortcut = std::pair<QString, int>; using ContextualShortcut = std::pair<QString, int>;
using Shortcut = std::pair<QString, ContextualShortcut>; 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 { struct Values {
QByteArray geometry; QByteArray geometry;
QByteArray state; QByteArray state;
@ -39,6 +44,8 @@ struct Values {
bool gamedir_deepscan; bool gamedir_deepscan;
QStringList recent_files; QStringList recent_files;
QString theme;
// Shortcut name <Shortcut, context> // Shortcut name <Shortcut, context>
std::vector<Shortcut> shortcuts; std::vector<Shortcut> shortcuts;
}; };