fix: horizontal scroll when shift modifier is pressed#1513
Open
ardiya wants to merge 1 commit intowkentaro:mainfrom
Open
fix: horizontal scroll when shift modifier is pressed#1513ardiya wants to merge 1 commit intowkentaro:mainfrom
ardiya wants to merge 1 commit intowkentaro:mainfrom
Conversation
Author
|
similar issue: #1504 |
minewilliam
approved these changes
Jan 22, 2026
Contributor
minewilliam
left a comment
There was a problem hiding this comment.
Tested. This fixes the side scrolling problem on my Linux machine.
Owner
|
It may be Linux specific issue. I can't reproduce on macOS and Windows (it does on Ubuntu). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.