diff options
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index ef32a11523..2937b80019 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -490,18 +490,23 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con } } -QFont OptionsModel::getFontForMoney() const +QFont OptionsModel::getFontForChoice(const FontChoice& fc) { QFont f; - if (std::holds_alternative<FontChoiceAbstract>(m_font_money)) { - f = GUIUtil::fixedPitchFont(m_font_money != UseBestSystemFont); + if (std::holds_alternative<FontChoiceAbstract>(fc)) { + f = GUIUtil::fixedPitchFont(fc != UseBestSystemFont); f.setWeight(QFont::Bold); } else { - f = std::get<QFont>(m_font_money); + f = std::get<QFont>(fc); } return f; } +QFont OptionsModel::getFontForMoney() const +{ + return getFontForChoice(m_font_money); +} + bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::string& suffix) { auto changed = [&] { return value.isValid() && value != getOption(option, suffix); }; |