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