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

add scrolling to pick_lists #872

Merged
merged 6 commits into from
Jul 22, 2021
Merged

add scrolling to pick_lists #872

merged 6 commits into from
Jul 22, 2021

Conversation

13r0ck
Copy link
Member

@13r0ck 13r0ck commented May 10, 2021

This is a PR to clean up #729 as that PR had 3 features, 2 of which are handled by iced_aw/#11 and #607.

All this PR does is create a message with a new Pick_List value when a scroll event is detected on said Pick_List.

@13r0ck 13r0ck mentioned this pull request May 10, 2021
native/src/widget/pick_list.rs Outdated Show resolved Hide resolved
@hecrj hecrj added the feature New feature or request label May 25, 2021
@hecrj hecrj added this to the 0.4.0 milestone May 25, 2021
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.

Looks great! Thanks! 🎉

I have abstracted and simplified the logic a bit in 6069e90 so there's not as much code duplication and we avoid edge cases when the list of options is empty.

Additionally, I have disabled the scrolling behavior for the Pixels variant of ScrollDelta. This way, the PickList will react to discrete scroll events (e.g. an actual mouse wheel) while dismissing continuous scroll events (e.g. scrolling with a trackpad).

I believe this ship is ready to sail! 🚢

@hecrj hecrj merged commit dc0b96c into iced-rs:master Jul 22, 2021
@13r0ck
Copy link
Member Author

13r0ck commented Jul 23, 2021

No, thank you!!!!!! 😄
Your changes are a great learning lesson for me too. I hope you have a great weekend. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants