Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/inverted slider 2025 #7389

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ccric
Copy link

@ccric ccric commented Jan 17, 2025

Changed slider value calculation to allow inverting the slider by switching minimum and maximum boundaries.
Closes #4705

@ogoffart ogoffart requested a review from FloVanGH January 17, 2025 08:41
@ogoffart ogoffart added the a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) label Jan 17, 2025
Copy link
Member

@FloVanGH FloVanGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the PR. Three additional things:

The adjustment for the qt style is missing. For that you should check slider.rs. If you need helps just let me know.

The intention is if minimum > maximum then the slider is also drawn inverted, right? I checked your branch with the cosmic style and there the slider wasn't drawn inverted.

Could you add an example to the gallery controls_page.slint, please.

@ccric
Copy link
Author

ccric commented Jan 17, 2025

My initial intention was to invert the values, but that makes more sense together with also inverting the drawing.
I added that to the cosmic, cupertino, fluent and material style. The material style has some bug when drawing the sliders vertical, but that doesn't seem to be related with my changes.
I added some variants of the slider to the gallery example.

For the qt-backend: I changed the min/max boundary of the value. But I have not figured out how to render the inverted slider correct, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants