mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #6081 from ligfx/graphicsuseconfigchanged
Qt: bold graphics settings on ConfigChanged, not EmulationStateChanged
This commit is contained in:
@ -16,7 +16,7 @@ GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo<bool>&
|
|||||||
connect(this, &QCheckBox::toggled, this, &GraphicsBool::Update);
|
connect(this, &QCheckBox::toggled, this, &GraphicsBool::Update);
|
||||||
setChecked(Config::Get(m_setting) ^ reverse);
|
setChecked(Config::Get(m_setting) ^ reverse);
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this]() {
|
connect(&Settings::Instance(), &Settings::ConfigChanged, [this] {
|
||||||
QFont bf = font();
|
QFont bf = font();
|
||||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||||
setFont(bf);
|
setFont(bf);
|
||||||
|
@ -15,7 +15,7 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigI
|
|||||||
&GraphicsChoice::Update);
|
&GraphicsChoice::Update);
|
||||||
setCurrentIndex(Config::Get(m_setting));
|
setCurrentIndex(Config::Get(m_setting));
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this]() {
|
connect(&Settings::Instance(), &Settings::ConfigChanged, [this] {
|
||||||
QFont bf = font();
|
QFont bf = font();
|
||||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||||
setFont(bf);
|
setFont(bf);
|
||||||
|
@ -19,7 +19,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::ConfigInf
|
|||||||
|
|
||||||
connect(this, &GraphicsSlider::valueChanged, this, &GraphicsSlider::Update);
|
connect(this, &GraphicsSlider::valueChanged, this, &GraphicsSlider::Update);
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this]() {
|
connect(&Settings::Instance(), &Settings::ConfigChanged, [this] {
|
||||||
QFont bf = font();
|
QFont bf = font();
|
||||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||||
setFont(bf);
|
setFont(bf);
|
||||||
|
@ -7,12 +7,14 @@
|
|||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
#include "AudioCommon/AudioCommon.h"
|
#include "AudioCommon/AudioCommon.h"
|
||||||
|
#include "Common/Config/Config.h"
|
||||||
#include "Common/FileSearch.h"
|
#include "Common/FileSearch.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "DolphinQt2/GameList/GameListModel.h"
|
#include "DolphinQt2/GameList/GameListModel.h"
|
||||||
|
#include "DolphinQt2/QtUtils/QueueOnObject.h"
|
||||||
#include "DolphinQt2/Settings.h"
|
#include "DolphinQt2/Settings.h"
|
||||||
#include "InputCommon/InputConfig.h"
|
#include "InputCommon/InputConfig.h"
|
||||||
|
|
||||||
@ -21,6 +23,9 @@ Settings::Settings()
|
|||||||
qRegisterMetaType<Core::State>();
|
qRegisterMetaType<Core::State>();
|
||||||
Core::SetOnStateChangedCallback(
|
Core::SetOnStateChangedCallback(
|
||||||
[this](Core::State new_state) { emit EmulationStateChanged(new_state); });
|
[this](Core::State new_state) { emit EmulationStateChanged(new_state); });
|
||||||
|
|
||||||
|
Config::AddConfigChangedCallback(
|
||||||
|
[this] { QueueOnObject(this, [this] { emit ConfigChanged(); }); });
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings& Settings::Instance()
|
Settings& Settings::Instance()
|
||||||
|
@ -81,6 +81,7 @@ public:
|
|||||||
GameListModel* GetGameListModel() const;
|
GameListModel* GetGameListModel() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void ConfigChanged();
|
||||||
void EmulationStateChanged(Core::State new_state);
|
void EmulationStateChanged(Core::State new_state);
|
||||||
void ThemeChanged();
|
void ThemeChanged();
|
||||||
void PathAdded(const QString&);
|
void PathAdded(const QString&);
|
||||||
|
Reference in New Issue
Block a user