mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-18 19:40:40 +01:00
GUI: OptionsDialog: Replace verbose two-option font selector with simple combobox with Custom... choice
This commit is contained in:
@@ -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); };
|
||||
|
||||
Reference in New Issue
Block a user