summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <lat9nq@virginia.edu>2020-07-13 23:42:13 +0200
committerlat9nq <lat9nq@virginia.edu>2020-07-19 19:26:55 +0200
commit5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110 (patch)
treee00b33e1e21ac99dfddecfa6da3c0c404ac107c7
parentconfigure_general: Implement manual tristate buttons (diff)
downloadyuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar.gz
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar.bz2
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar.lz
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar.xz
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.tar.zst
yuzu-5a9dc8f002c68e4af1fab9b7cfbd65e86ee2d110.zip
-rw-r--r--src/yuzu/configuration/configuration_shared.cpp10
-rw-r--r--src/yuzu/configuration/configuration_shared.h2
2 files changed, 6 insertions, 6 deletions
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<ConfigurationShared::CheckState>((tracker + 1) % CheckState::Count);
if (tracker == CheckState::Global) {
checkbox->setChecked(setting.GetValue(true));
}
- SetBGColor(checkbox, tracker != CheckState::Global);
+ SetHighlight(checkbox, tracker != CheckState::Global);
});
}
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index 4f0166fae..88709446c 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -45,7 +45,7 @@ void SetPerGameSetting(QComboBox* combobox,
void SetPerGameSetting(QComboBox* combobox,
const Settings::Setting<Settings::GPUAccuracy>* setting);
-void SetBGColor(QWidget* widget, bool highlighted);
+void SetHighlight(QWidget* widget, bool highlighted);
void SetColoredTristate(QCheckBox* checkbox, Settings::Setting<bool>& setting,
ConfigurationShared::CheckState& tracker);