Optimal Slider for Textual #6481
Replies: 4 comments 8 replies
-
|
I'm curious how this works as it isn't clear from the screen recording. How do you differentiate a drag to move the slider vs. a drag to increment the float? |
Beta Was this translation helpful? Give feedback.
4 replies
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found the fix to cell width limitations for sliders, my solution seems to allow for up to 15 decimal places of precision . . .
It introduces artifacts if you exceed 15 or use more than the recommended amount based on span size, reduction by 1 per power of 10 of span with respect to the chosen min and max values.
I embedded styling options into the constructor, so it utilizes the Color class to change the track color, handle color, and grip color. I also built a color pack, the sliders in the bottom-left use css colors, and the ones on the bottom-right use my true color variants of those colors. The color-pack has IDE name resolution incorporated, so most IDEs can find the colors by name as they were presented on the site, both for the defaults provided as css colors, and for my true color variants, as well as lab variants, for ease of access.
There are about 8 different control options for the Slider, each handling what is demonstrated in the video: key inputs, mouse wheel scrolling, dragging, tick dragging, ctrl modifiers for each and a pop-up input field. It was built as a widget, so it is a standalone widget that can be imported directly and has not yet struggled with use in containers.
The other Widget in this is my version of the Switch. It's stylable through its constructor like the Slider and easily embeddable into other containers as well. The labels on the Switch can be altered to whatever is necessary, but it only supports 5 characters worth of text, so 3-5 char acronyms or pseudonyms are expected.
Screen.Recording.2026-04-08.043040.mp4
Beta Was this translation helpful? Give feedback.
All reactions