-
Notifications
You must be signed in to change notification settings - Fork 844
Simplify scrolling code #2048
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
base: main
Are you sure you want to change the base?
Simplify scrolling code #2048
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
plugin/mouse/mouse_scroll.py
Outdated
| __slots__ = ("_scroll_dir", "_is_vertical", "_direction_constant") | ||
|
|
||
| def __init__(self): | ||
| self._scroll_dir: Literal[-1, 1] = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would recommend that you just call set_direction here.
plugin/mouse/mouse_scroll.py
Outdated
| RIGHT = auto() | ||
|
|
||
|
|
||
| class ScrollingDirection: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| class ScrollingDirection: | |
| class Scroller: |
then this will free up ScrollingDirection for the enum.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
From the community backlog session — code looks in good shape, but we would like some additional testing! |
Simplify the continuous scrolling code with better state management.