Skip to content

Optimizations in ScaledSlider - #3881

Merged
georgweiss merged 2 commits into
masterfrom
CSSTUDIO-1723
Jul 14, 2026
Merged

Optimizations in ScaledSlider#3881
georgweiss merged 2 commits into
masterfrom
CSSTUDIO-1723

Conversation

@georgweiss

Copy link
Copy Markdown
Collaborator

As suggested by Mr Claude: do not adjust sizes of the slider UI elements on value change, only on size change.

Also tweaked default sizes a bit to make a fresh ScaledSlider resemble the native JavaFX slider with default paddings.

  • Testing:

    • The feature has automated tests
    • [ X] Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

* </p>
*/
private void adjustSizes(){
SliderSkin skin = (SliderSkin) slider.getSkin();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why remove this line? You are now calling this method twice.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Refactored this a bit. In general avoiding explicit cast if not necessary.

@sonarqubecloud

Copy link
Copy Markdown

@georgweiss
georgweiss merged commit 26a3aaa into master Jul 14, 2026
11 checks passed
@georgweiss
georgweiss deleted the CSSTUDIO-1723 branch July 14, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants