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

Fix image viewer not zooming #2726

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

leo030303
Copy link
Contributor

Fix for issue #2713
The image viewer update method wasn't requesting redraws, it now requests a redraw every time an event is captured.
I've tested this with the example app from the linked issue and it fixes the issue.

@leo030303 leo030303 changed the title Fix image zoom Fix image viewer not zooming issue #2713 Jan 11, 2025
@leo030303 leo030303 changed the title Fix image viewer not zooming issue #2713 Fix image viewer not zooming Jan 11, 2025
@edwloef
Copy link
Contributor

edwloef commented Jan 15, 2025

The ButtonPressed and ButtonReleased events probably don't need to request a redraw, since they don't change what needs to be drawn as far as I can tell.

@leo030303
Copy link
Contributor Author

I tried not redrawing on those events and it all renders the same except the cursor icon doesn't change to the "grabbed" version when clicking, or it gets stuck as the grabbed version, so thought it was worthwhile leaving them in, see the videos for what I mean, I'm on Wayland with Gnome 43

No Redraw
no_redraw

With Redraw
redraw

@edwloef
Copy link
Contributor

edwloef commented Jan 15, 2025

Ah right, oops.

@rhysd
Copy link

rhysd commented Jan 23, 2025

I confirmed this patch fixed #2713.

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.

3 participants