From e26e82d8d5f9a3907b3623bd50dffd1c9b84969e Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 17:08:24 -0400 Subject: configuration_shared: Initial functions and data for manual tristate Sets up initial support for implementing colored tristate functions. These functions color a QWidget blue when it's overriding a global setting, and discolor it when not. The lack of color indicates it uses the global state, replacing the Qt::CheckState::PartiallyChecked state with the global state. --- src/yuzu/configuration/configuration_shared.cpp | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index bb47c3933..f32fcf3b7 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -4,10 +4,15 @@ #include #include +#include #include "core/settings.h" #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_per_game.h" +namespace ConfigurationShared { +Trackers trackers = {}; +} + void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, const QCheckBox* checkbox) { if (checkbox->checkState() == Qt::PartiallyChecked) { @@ -18,6 +23,17 @@ void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, } } +void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, + const QCheckBox* checkbox, + const CheckState& tracker) { + if (tracker == CheckState::Global) { + setting->SetGlobal(true); + } else { + setting->SetGlobal(false); + setting->SetValue(checkbox->checkState()); + } +} + void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, const QComboBox* combobox) { if (combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) { @@ -69,6 +85,32 @@ void ConfigurationShared::SetPerGameSetting( ConfigurationShared::USE_GLOBAL_OFFSET); } +void ConfigurationShared::SetBGColor(QWidget* widget, bool highlighted) { + if (highlighted) { + widget->setStyleSheet(QStringLiteral("background-color:rgba(0,203,255,0.5);")); + } else { + widget->setStyleSheet(QStringLiteral("background-color:rgba(0,0,0,0);")); + } + widget->show(); +} + +void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, Settings::Setting& setting, + ConfigurationShared::CheckState& tracker) { + if (setting.UsingGlobal()) { + tracker = CheckState::Global; + } else { + tracker = (setting.GetValue() == setting.GetValue(true)) ? CheckState::On : CheckState::Off; + } + SetBGColor(checkbox, tracker != CheckState::Global); + QObject::connect(checkbox, &QCheckBox::clicked, checkbox, [checkbox, setting, &tracker]() { + tracker = static_cast((tracker + 1) % CheckState::Count); + if (tracker == CheckState::Global) { + checkbox->setChecked(setting.GetValue(true)); + } + SetBGColor(checkbox, tracker != CheckState::Global); + }); +} + void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { const QString use_global_text = ConfigurePerGame::tr("Use global configuration"); combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); -- cgit v1.2.3 From 5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 17:42:13 -0400 Subject: configuration_shared: Use a highlight instead of background color Fixes visibility in the built-in dark theme --- src/yuzu/configuration/configuration_shared.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index f32fcf3b7..78dd76c6e 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -85,11 +85,11 @@ void ConfigurationShared::SetPerGameSetting( ConfigurationShared::USE_GLOBAL_OFFSET); } -void ConfigurationShared::SetBGColor(QWidget* widget, bool highlighted) { +void ConfigurationShared::SetHighlight(QWidget* widget, bool highlighted) { if (highlighted) { - widget->setStyleSheet(QStringLiteral("background-color:rgba(0,203,255,0.5);")); + widget->setStyleSheet(QStringLiteral("border:2px solid;border-color:rgba(0,203,255,0.5);")); } else { - widget->setStyleSheet(QStringLiteral("background-color:rgba(0,0,0,0);")); + widget->setStyleSheet(QStringLiteral("border:2px solid;border-color:rgba(0,0,0,0);")); } widget->show(); } @@ -101,13 +101,13 @@ void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, Settings::Sett } else { tracker = (setting.GetValue() == setting.GetValue(true)) ? CheckState::On : CheckState::Off; } - SetBGColor(checkbox, tracker != CheckState::Global); + SetHighlight(checkbox, tracker != CheckState::Global); QObject::connect(checkbox, &QCheckBox::clicked, checkbox, [checkbox, setting, &tracker]() { tracker = static_cast((tracker + 1) % CheckState::Count); if (tracker == CheckState::Global) { checkbox->setChecked(setting.GetValue(true)); } - SetBGColor(checkbox, tracker != CheckState::Global); + SetHighlight(checkbox, tracker != CheckState::Global); }); } -- cgit v1.2.3 From da65b92f9e9992413938bb084949367822b890c8 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 19:22:41 -0400 Subject: configuration_shared: Require name of the widget for highlighting Prevents mass-coloring of elements later on --- src/yuzu/configuration/configuration_shared.cpp | 32 +++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 78dd76c6e..08d67facd 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "core/settings.h" #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_per_game.h" @@ -85,30 +86,37 @@ void ConfigurationShared::SetPerGameSetting( ConfigurationShared::USE_GLOBAL_OFFSET); } -void ConfigurationShared::SetHighlight(QWidget* widget, bool highlighted) { +void ConfigurationShared::SetHighlight(QWidget* widget, const std::string& name, bool highlighted) { if (highlighted) { - widget->setStyleSheet(QStringLiteral("border:2px solid;border-color:rgba(0,203,255,0.5);")); + widget->setStyleSheet( + QStringLiteral("QWidget#%1 { border:2px solid;border-color:rgba(0,203,255,0.5) }") + .arg(QString::fromStdString(name))); } else { - widget->setStyleSheet(QStringLiteral("border:2px solid;border-color:rgba(0,0,0,0);")); + widget->setStyleSheet( + QStringLiteral("QWidget#%1 { border:2px solid;border-color:rgba(0,0,0,0) }") + .arg(QString::fromStdString(name))); } widget->show(); } -void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, Settings::Setting& setting, +void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::string& name, + const Settings::Setting& setting, ConfigurationShared::CheckState& tracker) { if (setting.UsingGlobal()) { tracker = CheckState::Global; } else { tracker = (setting.GetValue() == setting.GetValue(true)) ? CheckState::On : CheckState::Off; } - SetHighlight(checkbox, tracker != CheckState::Global); - QObject::connect(checkbox, &QCheckBox::clicked, checkbox, [checkbox, setting, &tracker]() { - tracker = static_cast((tracker + 1) % CheckState::Count); - if (tracker == CheckState::Global) { - checkbox->setChecked(setting.GetValue(true)); - } - SetHighlight(checkbox, tracker != CheckState::Global); - }); + SetHighlight(checkbox, name, tracker != CheckState::Global); + QObject::connect( + checkbox, &QCheckBox::clicked, checkbox, [checkbox, name, setting, &tracker]() { + tracker = + static_cast((tracker + 1) % CheckState::Count); + if (tracker == CheckState::Global) { + checkbox->setChecked(setting.GetValue(true)); + } + SetHighlight(checkbox, name, tracker != CheckState::Global); + }); } void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { -- cgit v1.2.3 From 44b3183ec859062238720d4aaa5d9d50b9a947bd Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 21:35:58 -0400 Subject: configuration_shared: Better use global text Also adds trackers for graphics and advanced graphics --- src/yuzu/configuration/configuration_shared.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 08d67facd..0c881cf7d 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -124,3 +124,9 @@ void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } + +void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, const QString& global) { + const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(global); + combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); + combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); +} -- cgit v1.2.3 From b79a6ebf9c45f0a3147073a3b530fa43b9344842 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 21:36:31 -0400 Subject: configuration_shared: Switch back to background colors Let's see if I make up my mind. --- src/yuzu/configuration/configuration_shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 0c881cf7d..28b655222 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -89,11 +89,11 @@ void ConfigurationShared::SetPerGameSetting( void ConfigurationShared::SetHighlight(QWidget* widget, const std::string& name, bool highlighted) { if (highlighted) { widget->setStyleSheet( - QStringLiteral("QWidget#%1 { border:2px solid;border-color:rgba(0,203,255,0.5) }") + QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }") .arg(QString::fromStdString(name))); } else { widget->setStyleSheet( - QStringLiteral("QWidget#%1 { border:2px solid;border-color:rgba(0,0,0,0) }") + QStringLiteral("QWidget#%1 { background-color:rgba(0,0,0,0) }") .arg(QString::fromStdString(name))); } widget->show(); -- cgit v1.2.3 From 2627241541a2b2bc691c2776f111f95d7bd94c70 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 21:48:56 -0400 Subject: configuration_shared: Use an int instead of a QString I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics --- src/yuzu/configuration/configuration_shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 28b655222..a648d339b 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -125,8 +125,8 @@ void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } -void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, const QString& global) { - const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(global); +void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, int global_index) { + const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index)); combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } -- cgit v1.2.3 From 6316a3d8d9db432eb810c554385837c96037cba5 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 23:00:56 -0400 Subject: configuration_shared: Add default combobox setup function Not a catch-all, but helps clean up the code for when I do this a lot. Also fixes some bugs caught in configure_graphics. --- src/yuzu/configuration/configuration_shared.cpp | 42 ++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index a648d339b..0c7caf8b5 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -88,13 +88,11 @@ void ConfigurationShared::SetPerGameSetting( void ConfigurationShared::SetHighlight(QWidget* widget, const std::string& name, bool highlighted) { if (highlighted) { - widget->setStyleSheet( - QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }") - .arg(QString::fromStdString(name))); + widget->setStyleSheet(QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }") + .arg(QString::fromStdString(name))); } else { - widget->setStyleSheet( - QStringLiteral("QWidget#%1 { background-color:rgba(0,0,0,0) }") - .arg(QString::fromStdString(name))); + widget->setStyleSheet(QStringLiteral("QWidget#%1 { background-color:rgba(0,0,0,0) }") + .arg(QString::fromStdString(name))); } widget->show(); } @@ -119,6 +117,35 @@ void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::str }); } +void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::string& name, + bool global, bool state, bool global_state, + ConfigurationShared::CheckState& tracker) { + if (global) { + tracker = CheckState::Global; + } else { + tracker = (state == global_state) ? CheckState::On : CheckState::Off; + } + SetHighlight(checkbox, name, tracker != CheckState::Global); + QObject::connect( + checkbox, &QCheckBox::clicked, checkbox, [checkbox, name, global_state, &tracker]() { + tracker = + static_cast((tracker + 1) % CheckState::Count); + if (tracker == CheckState::Global) { + checkbox->setChecked(global_state); + } + SetHighlight(checkbox, name, tracker != CheckState::Global); + }); +} + +void ConfigurationShared::SetColoredComboBox(QComboBox* combobox, QWidget* target, + const std::string& target_name, int global) { + InsertGlobalItem(combobox, global); + QObject::connect(combobox, static_cast(&QComboBox::activated), + target, [target, target_name](int index) { + ConfigurationShared::SetHighlight(target, target_name, index != 0); + }); +} + void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { const QString use_global_text = ConfigurePerGame::tr("Use global configuration"); combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); @@ -126,7 +153,8 @@ void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { } void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, int global_index) { - const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index)); + const QString use_global_text = + ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index)); combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } -- cgit v1.2.3 From d5fdbd88c8a94421e48197b274fa47c6a8f93926 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Tue, 14 Jul 2020 00:36:58 -0400 Subject: clang-format --- src/yuzu/configuration/configuration_shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 0c7caf8b5..cb47c8eb5 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -140,8 +140,8 @@ void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::str void ConfigurationShared::SetColoredComboBox(QComboBox* combobox, QWidget* target, const std::string& target_name, int global) { InsertGlobalItem(combobox, global); - QObject::connect(combobox, static_cast(&QComboBox::activated), - target, [target, target_name](int index) { + QObject::connect(combobox, static_cast(&QComboBox::activated), target, + [target, target_name](int index) { ConfigurationShared::SetHighlight(target, target_name, index != 0); }); } -- cgit v1.2.3 From 0d462f560840f0ad584f1a24b02cd6c03cc4f5c2 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Tue, 14 Jul 2020 13:55:47 -0400 Subject: configuration_shared: Break up tracker structs to respective classes One less global variable. --- src/yuzu/configuration/configuration_shared.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index cb47c8eb5..e6141e6a9 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -10,10 +10,6 @@ #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_per_game.h" -namespace ConfigurationShared { -Trackers trackers = {}; -} - void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, const QCheckBox* checkbox) { if (checkbox->checkState() == Qt::PartiallyChecked) { -- cgit v1.2.3 From 335aef78c43ec5b488575b5eb790ae6e32ec7b63 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Tue, 14 Jul 2020 15:40:02 -0400 Subject: configuration_shared: Make CheckState strongly typed Also gets rid of unnecessary explicit namespace usage. --- src/yuzu/configuration/configuration_shared.cpp | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index e6141e6a9..30b6f7b28 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -95,42 +95,42 @@ void ConfigurationShared::SetHighlight(QWidget* widget, const std::string& name, void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::string& name, const Settings::Setting& setting, - ConfigurationShared::CheckState& tracker) { + CheckState& tracker) { if (setting.UsingGlobal()) { tracker = CheckState::Global; } else { tracker = (setting.GetValue() == setting.GetValue(true)) ? CheckState::On : CheckState::Off; } SetHighlight(checkbox, name, tracker != CheckState::Global); - QObject::connect( - checkbox, &QCheckBox::clicked, checkbox, [checkbox, name, setting, &tracker]() { - tracker = - static_cast((tracker + 1) % CheckState::Count); - if (tracker == CheckState::Global) { - checkbox->setChecked(setting.GetValue(true)); - } - SetHighlight(checkbox, name, tracker != CheckState::Global); - }); + QObject::connect(checkbox, &QCheckBox::clicked, checkbox, + [checkbox, name, setting, &tracker]() { + tracker = static_cast((static_cast(tracker) + 1) % + static_cast(CheckState::Count)); + if (tracker == CheckState::Global) { + checkbox->setChecked(setting.GetValue(true)); + } + SetHighlight(checkbox, name, tracker != CheckState::Global); + }); } void ConfigurationShared::SetColoredTristate(QCheckBox* checkbox, const std::string& name, bool global, bool state, bool global_state, - ConfigurationShared::CheckState& tracker) { + CheckState& tracker) { if (global) { tracker = CheckState::Global; } else { tracker = (state == global_state) ? CheckState::On : CheckState::Off; } SetHighlight(checkbox, name, tracker != CheckState::Global); - QObject::connect( - checkbox, &QCheckBox::clicked, checkbox, [checkbox, name, global_state, &tracker]() { - tracker = - static_cast((tracker + 1) % CheckState::Count); - if (tracker == CheckState::Global) { - checkbox->setChecked(global_state); - } - SetHighlight(checkbox, name, tracker != CheckState::Global); - }); + QObject::connect(checkbox, &QCheckBox::clicked, checkbox, + [checkbox, name, global_state, &tracker]() { + tracker = static_cast((static_cast(tracker) + 1) % + static_cast(CheckState::Count)); + if (tracker == CheckState::Global) { + checkbox->setChecked(global_state); + } + SetHighlight(checkbox, name, tracker != CheckState::Global); + }); } void ConfigurationShared::SetColoredComboBox(QComboBox* combobox, QWidget* target, -- cgit v1.2.3 From 520b4c7829196cef45995764509fb5b1afe2eac7 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Tue, 14 Jul 2020 15:42:45 -0400 Subject: configuration_shared: Remove unused functions These were only kept for compatibility with old code during testing. --- src/yuzu/configuration/configuration_shared.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 30b6f7b28..f9becab6e 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -10,16 +10,6 @@ #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_per_game.h" -void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, - const QCheckBox* checkbox) { - if (checkbox->checkState() == Qt::PartiallyChecked) { - setting->SetGlobal(true); - } else { - setting->SetGlobal(false); - setting->SetValue(checkbox->checkState() == Qt::Checked); - } -} - void ConfigurationShared::ApplyPerGameSetting(Settings::Setting* setting, const QCheckBox* checkbox, const CheckState& tracker) { @@ -142,12 +132,6 @@ void ConfigurationShared::SetColoredComboBox(QComboBox* combobox, QWidget* targe }); } -void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { - const QString use_global_text = ConfigurePerGame::tr("Use global configuration"); - combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); - combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); -} - void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, int global_index) { const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index)); -- cgit v1.2.3