Add method to bold slider/spin labels when a user game ini setting is being used

This commit is contained in:
TryTwo
2024-09-29 17:12:22 -07:00
parent ac129d318b
commit 9541bb6cf7
6 changed files with 57 additions and 4 deletions

View File

@ -29,3 +29,13 @@ void ConfigInteger::OnConfigChanged()
{
setValue(ReadValue(m_setting));
}
ConfigIntegerLabel::ConfigIntegerLabel(const QString& text, ConfigInteger* widget)
: QLabel(text), m_widget(QPointer<ConfigInteger>(widget))
{
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this]() {
// Label shares font changes with ConfigInteger to mark game ini settings.
if (m_widget)
setFont(m_widget->font());
});
}