Skip to content

Add Escape key to reset the image viewer - #3522

Open
Atreyagaurav wants to merge 1 commit into
iced-rs:masterfrom
Atreyagaurav:master
Open

Atreyagaurav wants to merge 1 commit into
iced-rs:masterfrom
Atreyagaurav:master

Conversation

@Atreyagaurav

@Atreyagaurav Atreyagaurav commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Image viewer zoom and pan currently doesn't have a way to reset them. This adds support for escape key to reset the transformation.

If there is a better way to do this, or you want the implementation to be different let me know.

I was also thinking of adding Keys for fit page (p), fit width (w), fit height (h), etc (needs the ContentFit to be stored in the State), but those are opinionated, so I only did the reset.

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.

1 participant