|
10 | 10 | #include <bass.h> |
11 | 11 |
|
12 | 12 | #include <QCollator> |
| 13 | +#include <QDoubleSpinBox> |
13 | 14 | #include <QGroupBox> |
14 | 15 | #include <QResource> |
15 | 16 | #include <QUiLoader> |
@@ -97,6 +98,18 @@ int AOOptionsDialog::widgetData(QSpinBox *widget) const |
97 | 98 | return widget->value(); |
98 | 99 | } |
99 | 100 |
|
| 101 | +template <> |
| 102 | +void AOOptionsDialog::setWidgetData(QDoubleSpinBox *widget, const double &value) |
| 103 | +{ |
| 104 | + widget->setValue(value); |
| 105 | +} |
| 106 | + |
| 107 | +template <> |
| 108 | +double AOOptionsDialog::widgetData(QDoubleSpinBox *widget) const |
| 109 | +{ |
| 110 | + return widget->value(); |
| 111 | +} |
| 112 | + |
100 | 113 | template <> |
101 | 114 | void AOOptionsDialog::setWidgetData(QComboBox *widget, const QString &value) |
102 | 115 | { |
@@ -344,7 +357,7 @@ void AOOptionsDialog::setupUI() |
344 | 357 | QDesktopServices::openUrl(QUrl::fromLocalFile(p_path)); |
345 | 358 | }); |
346 | 359 |
|
347 | | - FROM_UI(QSpinBox, theme_scaling_factor_sb); |
| 360 | + FROM_UI(QDoubleSpinBox, theme_scaling_factor_sb); |
348 | 361 | FROM_UI(QCheckBox, animated_theme_cb); |
349 | 362 | FROM_UI(QSpinBox, stay_time_spinbox); |
350 | 363 | FROM_UI(QCheckBox, instant_objection_cb); |
@@ -374,7 +387,7 @@ void AOOptionsDialog::setupUI() |
374 | 387 | FROM_UI(QCheckBox, restoreposition_cb); |
375 | 388 | FROM_UI(QLineEdit, playerlist_format_edit); |
376 | 389 |
|
377 | | - registerOption<QSpinBox, int>("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor); |
| 390 | + registerOption<QDoubleSpinBox, double>("theme_scaling_factor_sb", &Options::themeScalingFactor, &Options::setThemeScalingFactor); |
378 | 391 | registerOption<QCheckBox, bool>("animated_theme_cb", &Options::animatedThemeEnabled, &Options::setAnimatedThemeEnabled); |
379 | 392 | registerOption<QSpinBox, int>("stay_time_spinbox", &Options::textStayTime, &Options::setTextStayTime); |
380 | 393 | registerOption<QCheckBox, bool>("instant_objection_cb", &Options::objectionSkipQueueEnabled, &Options::setObjectionSkipQueueEnabled); |
|
0 commit comments