Thanks to visit codestin.com
Credit goes to github.com

Skip to content

New: Allow pixel based adjustments via arrow keys when capturing an area. #1070

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

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

SebiAi
Copy link
Contributor

@SebiAi SebiAi commented Sep 25, 2024

This allows to adjust the cursor position with the arrow keys when capturing an area.

It uses QCursor to set the mouse cursor position when the arrow keys are pressed (setPos). With this it is not possible to move beyond screen boundaries (at least on X11 - see below).
I've added a notice to the SnippingAreaSelectorInfoText class so users are aware of the feature. Let me know if I need to do something so the translation system works correctly.
I've also added this new feature to the two changelog files - inspired by the previous commits.

Important

I've only tested this on my personal machine running Linux Mint 21.3 Cinnamon (X11) with Qt 5.15.2. I don't know how the Qt Mouse positioning function handles other window managers.
I am trying rn to build with Qt6 and then build the AppImage so I can test in a vm with different window managers.

All the existing tests pass - as expected.

Here is a small demo video:

arrow.adjustments.demo.mp4

There may be more issues related to this but these are the ones I could find with a quick search:
Closes #646, closes #816, closes #887, closes #1002

@DamirPorobic DamirPorobic self-requested a review September 27, 2024 10:30
Copy link
Member

@DamirPorobic DamirPorobic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thank you for providing this PR :)

@DamirPorobic DamirPorobic merged commit a3ab71c into ksnip:master Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants