Skip to content

Sliders no longer bleed over rail#1721

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
casperstorm:feat/no-bleed-slider
Feb 20, 2023
Merged

Sliders no longer bleed over rail#1721
hecrj merged 1 commit intoiced-rs:masterfrom
casperstorm:feat/no-bleed-slider

Conversation

@casperstorm
Copy link
Member

@casperstorm casperstorm commented Feb 20, 2023

This PR is a suggestion for Slider to not bleed over the rails.

The default behaviour is that Slider comes to a stop when the handle is handle_width / 2 over the rail. I would like to propose we only move the handle within the rail. The gif below illustrate the current behaviour as well as my suggestion:

Bleed (current) No bleed (this PR)
slider_with_bleed slider_no_bleed

I believe this is the most common approach. macOS and Windows references below:

macos

windows

@hecrj hecrj added improvement An internal improvement widget labels Feb 20, 2023
@hecrj hecrj added this to the 0.9.0 milestone Feb 20, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Makes sense! Drawing outside of the widget bounds is forbidden as well :)

Thanks!

@hecrj hecrj merged commit 8c83d40 into iced-rs:master Feb 20, 2023
@hecrj hecrj mentioned this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement An internal improvement widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments