Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ void Options::setTheme(QString value)
config.setValue("theme", value);
}

int Options::themeScalingFactor() const
float Options::themeScalingFactor() const
{
int value = config.value("theme_scaling_factor", "1").toInt();
if (value <= 0)
float value = config.value("theme_scaling_factor", "1").toFloat();
if (value < 0.2)
{
value = 1;
}
return value;
}

void Options::setThemeScalingFactor(int value)
void Options::setThemeScalingFactor(float value)
{
config.setValue("theme_scaling_factor", value);
}
Expand Down
4 changes: 2 additions & 2 deletions src/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Options
QString theme() const;
void setTheme(QString value);

int themeScalingFactor() const;
void setThemeScalingFactor(int value);
float themeScalingFactor() const;
void setThemeScalingFactor(float value);

// Returns the blip rate from config.ini (once per X symbols)
int blipRate() const;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/aooptionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void AOOptionsDialog::setupUI()
FROM_UI(QCheckBox, restoreposition_cb);
FROM_UI(QLineEdit, playerlist_format_edit);

registerOption<QSpinBox, int>("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor);
registerOption<QSpinBox, float>("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor);
registerOption<QCheckBox, bool>("animated_theme_cb", &Options::animatedThemeEnabled, &Options::setAnimatedThemeEnabled);
registerOption<QSpinBox, int>("stay_time_spinbox", &Options::textStayTime, &Options::setTextStayTime);
registerOption<QCheckBox, bool>("instant_objection_cb", &Options::objectionSkipQueueEnabled, &Options::setObjectionSkipQueueEnabled);
Expand Down
Loading