Make Slider UI elements larger when widget size increases#3854
Open
georgweiss wants to merge 2 commits into
Open
Make Slider UI elements larger when widget size increases#3854georgweiss wants to merge 2 commits into
georgweiss wants to merge 2 commits into
Conversation
kasemir
approved these changes
Jun 26, 2026
kasemir
left a comment
Collaborator
There was a problem hiding this comment.
Sad to see how carefully aligned code, typed by a human with pride in his/her work like this:
... is replaced by mechanical formatting like this:
After all, this PR is all about cosmetics, the size of a slider button, so style does seem to matter at some level.
Still, I like the end result, so whatever
Collaborator
Author
|
@kasemir, sorry for hurting your pride. I will revert. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The Scaled Slider widget relies on the native JavaFX Slider. On high resolution monitors the default size of the track and knob may become a bit too small. While increasing the font is supported in the widget, other UI elements stay at their defaults even if widget is made taller/wider.
This PR adds a bit of logic to increase the width of the track, the size of the knob and the length of the major tick marks when user increases the height (horizontal) or width (vertical) of the widget. Unfortunately I was not able to figure out how to also make minor tick marks longer.
A minimum and maximum is applied to keep this reasonably useful:
Decided that new widget properties for track, knob and major tick mark dimensions would be an overkill.
Testing:
Documentation: