summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorspycrab <spycrab@users.noreply.github.com>2018-05-19 03:00:34 +0200
committerGitHub <noreply@github.com>2018-05-19 03:00:34 +0200
commitadcaf3c581f0fdab0d3c3f26f9de4efdfe2ea571 (patch)
treee25ee9d1996fcc589ec278e300670f80d9e13ec9 /Source
parentfbf79f837ffebcf0c664fbae09c318173cc9ba51 (diff)
parent5e3d7dc162f2bce216ba2cc6caab3489ab99000d (diff)
Merge pull request #6887 from spycrab/qt_slider_accuracy
Qt/HacksWidget: Fix slider not showing overridden settings
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt2/Config/Graphics/HacksWidget.cpp18
-rw-r--r--Source/Core/DolphinQt2/Config/Graphics/HacksWidget.h2
2 files changed, 19 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.cpp b/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.cpp
index 7a9032cdc4..fb53177636 100644
--- a/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.cpp
+++ b/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.cpp
@@ -11,9 +11,12 @@
#include "Core/Config/GraphicsSettings.h"
#include "Core/ConfigManager.h"
+
#include "DolphinQt2/Config/Graphics/GraphicsBool.h"
#include "DolphinQt2/Config/Graphics/GraphicsSlider.h"
#include "DolphinQt2/Config/Graphics/GraphicsWindow.h"
+#include "DolphinQt2/Settings.h"
+
#include "VideoCommon/VideoConfig.h"
HacksWidget::HacksWidget(GraphicsWindow* parent) : GraphicsWidget(parent)
@@ -25,6 +28,7 @@ HacksWidget::HacksWidget(GraphicsWindow* parent) : GraphicsWidget(parent)
connect(parent, &GraphicsWindow::BackendChanged, this, &HacksWidget::OnBackendChanged);
OnBackendChanged(QString::fromStdString(SConfig::GetInstance().m_strVideoBackend));
+ connect(&Settings::Instance(), &Settings::ConfigChanged, this, &HacksWidget::LoadSettings);
}
void HacksWidget::CreateWidgets()
@@ -62,7 +66,9 @@ void HacksWidget::CreateWidgets()
auto* safe_label = new QLabel(tr("Safe"));
safe_label->setAlignment(Qt::AlignRight);
- texture_cache_layout->addWidget(new QLabel(tr("Accuracy:")), 0, 0);
+ m_accuracy_label = new QLabel(tr("Accuracy:"));
+
+ texture_cache_layout->addWidget(m_accuracy_label, 0, 0);
texture_cache_layout->addWidget(safe_label, 0, 1);
texture_cache_layout->addWidget(m_accuracy, 0, 2);
texture_cache_layout->addWidget(new QLabel(tr("Fast")), 0, 3);
@@ -126,6 +132,7 @@ void HacksWidget::ConnectWidgets()
void HacksWidget::LoadSettings()
{
+ const bool old = m_accuracy->blockSignals(true);
auto samples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
int slider_pos = 0;
@@ -147,6 +154,15 @@ void HacksWidget::LoadSettings()
}
m_accuracy->setValue(slider_pos);
+
+ QFont bf = m_accuracy_label->font();
+
+ bf.setBold(Config::GetActiveLayerForConfig(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES) !=
+ Config::LayerType::Base);
+
+ m_accuracy_label->setFont(bf);
+
+ m_accuracy->blockSignals(old);
}
void HacksWidget::SaveSettings()
diff --git a/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.h b/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.h
index 8d9255155c..cf3df7a446 100644
--- a/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.h
+++ b/Source/Core/DolphinQt2/Config/Graphics/HacksWidget.h
@@ -8,6 +8,7 @@
class GraphicsWindow;
class QCheckBox;
+class QLabel;
class QRadioButton;
class QSlider;
@@ -29,6 +30,7 @@ private:
QCheckBox* m_store_efb_copies;
// Texture Cache
+ QLabel* m_accuracy_label;
QSlider* m_accuracy;
QCheckBox* m_gpu_texture_decoding;