Improve zoom display in title bar#61
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated the zoom status text display in the custom title bar of the QML interface. When zoom ratio is within ±0.03 of 1.0, the display now shows "Zoom: Fit to window (%)" instead of just "Fit to window". Other zoom levels now prefix with "Zoom:" and round the percentage value. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60b55127b5
ℹ️ 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".
| if (Math.abs(ratio - 1.0) < 0.03) return "Zoom: Fit to window (" + Math.round(zs * 100) + "%)" | ||
| return "Zoom: " + Math.round(ratio * 100) + "%" |
There was a problem hiding this comment.
Use one zoom basis for both fit and non-fit labels
This change mixes two different percent bases in the same label: the fit branch shows absolute scale (zs * 100), while the non-fit branch shows relative-to-fit scale (ratio * 100). When currentFitScale is not 1.0 (common on large images), a tiny zoom change across the 3% fit threshold can make the title jump from something like Fit to window (42%) to Zoom: 104%, which is misleading because the underlying zoom barely changed. Keeping both branches on the same basis avoids this discontinuity.
Useful? React with 👍 / 👎.
Summary by CodeRabbit