Merge pull request #11377 from BenjaminHalko/reverse-slider-input

ui: Fixed inverted controls on ReverseSlider widgets
master
liamwhite 2023-08-25 18:06:03 +07:00 committed by GitHub
commit bc4e58eb51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

@ -235,6 +235,7 @@ QWidget* Widget::CreateSlider(bool reversed, float multiplier, const QString& gi
slider->setValue(std::stoi(setting.ToString())); slider->setValue(std::stoi(setting.ToString()));
slider->setInvertedAppearance(reversed); slider->setInvertedAppearance(reversed);
slider->setInvertedControls(reversed);
serializer = [this]() { return std::to_string(slider->value()); }; serializer = [this]() { return std::to_string(slider->value()); };
restore_func = [this]() { slider->setValue(std::stoi(RelevantDefault(setting))); }; restore_func = [this]() { slider->setValue(std::stoi(RelevantDefault(setting))); };