|
25 | 25 | #include <QObject> |
26 | 26 | #include <QDesktopServices> |
27 | 27 | #include <QUuid> |
| 28 | +#include "ClampedDoubleSpinBox.hpp" |
28 | 29 | #include "double-slider.hpp" |
29 | 30 | #include "spinbox-ignorewheel.hpp" |
30 | 31 | #include "moc_properties-view.cpp" |
@@ -479,7 +480,7 @@ void OBSPropertiesView::AddFloat(obs_property_t *prop, QFormLayout *layout, QLab |
479 | 480 |
|
480 | 481 | const char *name = obs_property_name(prop); |
481 | 482 | double val = obs_data_get_double(settings, name); |
482 | | - QDoubleSpinBox *spin = new QDoubleSpinBox(); |
| 483 | + ClampedDoubleSpinBox *spin = new ClampedDoubleSpinBox(); |
483 | 484 |
|
484 | 485 | if (!obs_property_enabled(prop)) |
485 | 486 | spin->setEnabled(false); |
@@ -512,8 +513,8 @@ void OBSPropertiesView::AddFloat(obs_property_t *prop, QFormLayout *layout, QLab |
512 | 513 | slider->setOrientation(Qt::Horizontal); |
513 | 514 | subLayout->addWidget(slider); |
514 | 515 |
|
515 | | - connect(slider, &DoubleSlider::doubleValChanged, spin, &QDoubleSpinBox::setValue); |
516 | | - connect(spin, &QDoubleSpinBox::valueChanged, slider, &DoubleSlider::setDoubleVal); |
| 516 | + connect(slider, &DoubleSlider::doubleValChanged, spin, &ClampedDoubleSpinBox::setValue); |
| 517 | + connect(spin, &ClampedDoubleSpinBox::valueChanged, slider, &DoubleSlider::setDoubleVal); |
517 | 518 | } |
518 | 519 |
|
519 | 520 | connect(spin, &QDoubleSpinBox::valueChanged, info, &WidgetInfo::ControlChanged); |
|
0 commit comments