diff --git a/src/options.cpp b/src/options.cpp index caa559c80..582090c44 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -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); } diff --git a/src/options.h b/src/options.h index 58b02253b..16530241a 100644 --- a/src/options.h +++ b/src/options.h @@ -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; diff --git a/src/widgets/aooptionsdialog.cpp b/src/widgets/aooptionsdialog.cpp index 67f9c1cab..b92eef260 100644 --- a/src/widgets/aooptionsdialog.cpp +++ b/src/widgets/aooptionsdialog.cpp @@ -374,7 +374,7 @@ void AOOptionsDialog::setupUI() FROM_UI(QCheckBox, restoreposition_cb); FROM_UI(QLineEdit, playerlist_format_edit); - registerOption("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor); + registerOption("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor); registerOption("animated_theme_cb", &Options::animatedThemeEnabled, &Options::setAnimatedThemeEnabled); registerOption("stay_time_spinbox", &Options::textStayTime, &Options::setTextStayTime); registerOption("instant_objection_cb", &Options::objectionSkipQueueEnabled, &Options::setObjectionSkipQueueEnabled);