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

Improve TextEditor slow scrolling behavior with touchpads #2140

Merged
merged 4 commits into from
Feb 3, 2024

Conversation

blazra
Copy link
Contributor

@blazra blazra commented Nov 17, 2023

If you scroll really slowly, then the text editor does not scroll, because the scrolling events which scroll by less than a single line don't do anything.

I have made a change so that the TextEditor stores the fractional part of the number of lines to scroll and adds it on the next scroll event.
For example, Kate or Konsole seems to behave like this.

@hecrj hecrj added this to the 0.12 milestone Jan 31, 2024
@hecrj hecrj added bug Something isn't working text widget fix labels Jan 31, 2024
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 reasonable. Thanks! 🙇

blazra and others added 2 commits February 3, 2024 14:14
If you scroll by only a fraction of a line, the TextEditor
stores this fraction and adds it on the next scroll event.
@hecrj hecrj merged commit 0b2c9db into iced-rs:master Feb 3, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix text widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants