Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: horizontal scroll when shift modifier is pressed #1513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ardiya
Copy link

@ardiya ardiya commented Nov 13, 2024

Issue:

Both Scroll and Shift+Scroll resulted in vertical(up-down) scrolling in QT5.

It seems the else(QT5) condition properly handle the shift+scroll condition, ref: https://github.com/ardiya/labelme/blob/57fbf2b9a749cd77ac5f03f005ee6206d671ece8/labelme/widgets/canvas.py#L928-L929 So I just need to handle the QT5 condition.

Expected result:

In Qt5, the Shift+Scroll should result in horizontal(left-right) scroll.

Proposed Fix: This PR

When Shift modifier is pressed, use the y dimension of the scroll and use it to scroll horizontally.

Tested with shift and without shift, the code changes produces expected behavior.

@ardiya
Copy link
Author

ardiya commented Nov 13, 2024

similar issue: #1504

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant