-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Slider: Add bottom and top ticks and tick offset #103907
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
Slider: Add bottom and top ticks and tick offset #103907
Conversation
This will affect existing projects (albeit not in major ways), so it would be best to make it configurable with a Tick Offset theme constant. |
5cd050b
to
3e35d83
Compare
The offset default should be such that it preserves the original behaviour, and allow you to change it to compensate, or this will still break compatibility |
If we accept tick is drawn at the center, the original behavior still can't be guaranteed by the default value of tick offset, because the |
Both before and after are pretty strange UI choices, sliders usually have either no ticks and round grabber, or offsets ticks on the one or both sides and arrow/rectangular grabber. It might be worth adding separate |
I don't think |
3e35d83
to
d06a1ee
Compare
03f8759
to
3c89baf
Compare
Is there any use in having style for both top and bottom tick? All examples of double ticks I found are symmetrical, so you can just repeat the |
3c89baf
to
5bed503
Compare
personally id still really like a way to have them run through the center, just for the customizability (and stylisation) option. could integrating the original pr as a toggle or similar be considered? :3 |
It's OK to add a "center" option. And we can just keep one |
5bed503
to
4b0872c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Compatibility breakage could be avoided with proper defaults, but not sure if it's worth it; it would require some awkward values. The new ticks look better IMO and they are similar enough.
4b0872c
to
3366682
Compare
3366682
to
e5dcf1a
Compare
For the top or left ticks, I used |
You can use |
24ae709
to
299e1de
Compare
299e1de
to
808aa5a
Compare
808aa5a
to
6220074
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Allow ticks to be placed at the top, bottom, or center with custom offset.
05e79c3
to
257c6eb
Compare
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working as expected.
Thanks! |
Fixes #103839.
Before:

Edit: This PR adds
tick_position
andtick_offset
to allows the ticks to be placed at the top, bottom, or center with custom offset.