Skip to content
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

Make the image overlay behave better #1643

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

Conversation

LorenDB
Copy link
Member

@LorenDB LorenDB commented Dec 23, 2023

Previously, the image would not try to stay centered; furthermore,
on mobile devices, it was impossible to zoom images without dropping
them at a slightly off rotation. This bothered me enough that I've
clamped images to the center of the screen (as long as they aren't
zoomed larger than the screen) and snapped rotations to 45-degree
increments (with a nice animation to boot).

@LorenDB LorenDB force-pushed the betterimageview branch 2 times, most recently from 5bdd6d7 to 1948ef0 Compare February 1, 2024 01:18
@LorenDB
Copy link
Member Author

LorenDB commented Feb 1, 2024

FWIW, I originally tried to clamp the image edges to the screen edge if the image was zoomed in to be larger than the screen in at least one dimension, but it kept acting buggy, so I gave up on that.

Comment on lines 147 to 148
xAxis.enabled: imgContainer.physicalWidth > Screen.width
yAxis.enabled: imgContainer.physicalHeight > Screen.height
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we be comparing against the window size here in case some compositor ignores our full screen request?

Copy link
Member

Choose a reason for hiding this comment

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

(Same in the places above)

@deepbluev7
Copy link
Member

Seems to work well with a mouse, still need to test it on my touchpad :D

Previously, the image would not try to stay centered; furthermore,
on mobile devices, it was impossible to zoom images without dropping
them at a slightly off rotation. This bothered me enough that I've
clamped images to the center of the screen (as long as they aren't
zoomed larger than the screen) and snapped rotations to 45-degree
increments (with a nice animation to boot).
@deepbluev7
Copy link
Member

deepbluev7 commented Jun 16, 2024

Hm, does anybody remember, why I hadn't merged that yet? Just because I didn't test it with my touchpad yet? Or because the rotation snapping didn't work?

@LorenDB
Copy link
Member Author

LorenDB commented Jun 16, 2024

I think just the touchpad.

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

Successfully merging this pull request may close these issues.

2 participants