Merge pull request #4314 from FearlessTobi/port-1440
Port yuzu-emu/yuzu#1440: "ui_settings: Place definition of the theme array within the cpp file"
This commit is contained in:
commit
a8155fdf48
@ -31,7 +31,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
|||||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||||
&ConfigureGeneral::onLanguageChanged);
|
&ConfigureGeneral::onLanguageChanged);
|
||||||
|
|
||||||
for (auto theme : UISettings::themes) {
|
for (const auto& theme : UISettings::themes) {
|
||||||
ui->theme_combobox->addItem(theme.first, theme.second);
|
ui->theme_combobox->addItem(theme.first, theme.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,5 +6,13 @@
|
|||||||
|
|
||||||
namespace UISettings {
|
namespace UISettings {
|
||||||
|
|
||||||
|
const Themes themes{{
|
||||||
|
{"Default", "default"},
|
||||||
|
{"Dark", "qdarkstyle"},
|
||||||
|
{"Colorful", "colorful"},
|
||||||
|
{"Colorful Dark", "colorful_dark"},
|
||||||
|
}};
|
||||||
|
|
||||||
Values values = {};
|
Values values = {};
|
||||||
}
|
|
||||||
|
} // namespace UISettings
|
||||||
|
@ -16,11 +16,8 @@ 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>, 4> themes = {
|
using Themes = std::array<std::pair<const char*, const char*>, 4>;
|
||||||
{std::make_pair(QString("Default"), QString("default")),
|
extern const Themes themes;
|
||||||
std::make_pair(QString("Dark"), QString("qdarkstyle")),
|
|
||||||
std::make_pair(QString("Colorful"), QString("colorful")),
|
|
||||||
std::make_pair(QString("Colorful Dark"), QString("colorful_dark"))}};
|
|
||||||
|
|
||||||
struct GameDir {
|
struct GameDir {
|
||||||
QString path;
|
QString path;
|
||||||
|
Loading…
Reference in New Issue
Block a user