Merge pull request #6717 from spycrab/issue_11039
Qt/GraphicsControls: Reload values when settings are changed
This commit is contained in:
commit
ad836b9071
|
@ -20,6 +20,7 @@ GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo<bool>&
|
|||
QFont bf = font();
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
setChecked(Config::Get(m_setting) ^ m_reverse);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigI
|
|||
QFont bf = font();
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
setCurrentIndex(Config::Get(m_setting));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,13 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInf
|
|||
{
|
||||
setChecked(Config::Get(m_setting) == m_value);
|
||||
connect(this, &QRadioButton::toggled, this, &GraphicsRadioInt::Update);
|
||||
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, [this] {
|
||||
QFont bf = font();
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
setChecked(Config::Get(m_setting) == m_value);
|
||||
});
|
||||
}
|
||||
|
||||
void GraphicsRadioInt::Update()
|
||||
|
|
|
@ -23,6 +23,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::ConfigInf
|
|||
QFont bf = font();
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
setValue(Config::Get(m_setting));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue