Skip to content

fix desktop media zoom#1856

Merged
Tlaster merged 2 commits intomasterfrom
bugfix/desktop_media_zoom
Mar 9, 2026
Merged

fix desktop media zoom#1856
Tlaster merged 2 commits intomasterfrom
bugfix/desktop_media_zoom

Conversation

@Tlaster
Copy link
Contributor

@Tlaster Tlaster commented Mar 9, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 889d08985b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +530 to +533
max(
transformation.scaleMetadata.initialScale.scaleX,
transformation.scaleMetadata.initialScale.scaleY,
),

Choose a reason for hiding this comment

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

P2 Badge Reset double-click zoom to baseline user zoom

When the image is already zoomed in, this path resets with zoomFactor = max(initialScale.scaleX, initialScale.scaleY), but the surrounding logic (userZoom > 1.01f) is working in user-zoom units where the baseline is 1f. Because initialScale depends on media and viewport size, double-click can reset to a non-baseline zoom (e.g., <1 for large images or >1 for small images), so the toggle no longer reliably returns to the normal fitted view. Use a baseline user zoom (1f) or resetZoom() for the zoom-out branch.

Useful? React with 👍 / 👎.

@Tlaster Tlaster merged commit 5dc6023 into master Mar 9, 2026
8 checks passed
@Tlaster Tlaster deleted the bugfix/desktop_media_zoom branch March 9, 2026 16:56
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