Skip to content

Improve TextEditor slow scrolling behavior with touchpads#2140

Merged
hecrj merged 4 commits into
iced-rs:masterfrom
blazra:master
Feb 3, 2024
Merged

Improve TextEditor slow scrolling behavior with touchpads#2140
hecrj merged 4 commits into
iced-rs:masterfrom
blazra:master

Conversation

@blazra

@blazra blazra commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

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

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

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
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