From 27726c9ce1fd6ff1e581bade5911e3bf05bc59f2 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Sat, 10 Feb 2024 05:23:34 -0600 Subject: Add integer-based theme scaling (#935) Configurable over the options menu, --- src/widgets/aooptionsdialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/aooptionsdialog.cpp b/src/widgets/aooptionsdialog.cpp index 6f121b3b..e25b3805 100644 --- a/src/widgets/aooptionsdialog.cpp +++ b/src/widgets/aooptionsdialog.cpp @@ -216,7 +216,10 @@ void AOOptionsDialog::updateValues() void AOOptionsDialog::savePressed() { - bool l_reload_theme_required = (ui_theme_combobox->currentText() != Options::getInstance().theme()); + bool l_reload_theme_required = + (ui_theme_combobox->currentText() != Options::getInstance().theme()) || + (ui_theme_scaling_factor_sb->value() != + Options::getInstance().themeScalingFactor()); for (const OptionEntry &entry : qAsConst(optionEntries)) { entry.save(); } @@ -337,6 +340,7 @@ void AOOptionsDialog::setupUI() QDesktopServices::openUrl(QUrl::fromLocalFile(p_path)); }); + FROM_UI(QSpinBox, theme_scaling_factor_sb) FROM_UI(QCheckBox, animated_theme_cb) FROM_UI(QSpinBox, stay_time_spinbox) FROM_UI(QCheckBox, instant_objection_cb) @@ -363,6 +367,9 @@ void AOOptionsDialog::setupUI() FROM_UI(QCheckBox, sfx_on_idle_cb) FROM_UI(QCheckBox, evidence_double_click_cb) + registerOption("theme_scaling_factor_sb", + &Options::themeScalingFactor, + &Options::setThemeScalingFactor); registerOption("animated_theme_cb", &Options::animatedThemeEnabled, &Options::setAnimatedThemeEnabled); -- cgit