Skip to content
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

Sliders no longer bleed over rail #1721

Merged
merged 1 commit into from
Feb 20, 2023

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