Skip to content

Improve zoom display in title bar#61

Merged
AlanRockefeller merged 1 commit intomainfrom
test
Mar 28, 2026
Merged

Improve zoom display in title bar#61
AlanRockefeller merged 1 commit intomainfrom
test

Conversation

@AlanRockefeller
Copy link
Copy Markdown
Owner

@AlanRockefeller AlanRockefeller commented Mar 27, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved zoom status display in the title bar: zoom percentage now consistently shows with proper formatting and rounding. The "Fit to window" status now includes the zoom percentage alongside the status text for better clarity.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68c8117e-2a10-463b-a745-47d536bf6331

📥 Commits

Reviewing files that changed from the base of the PR and between ac66a22 and 60b5512.

📒 Files selected for processing (1)
  • faststack/qml/Main.qml

Walkthrough

Updated 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

Cohort / File(s) Summary
Zoom Status Display
faststack/qml/Main.qml
Updated zoom status text logic in the title bar to consistently prefix zoom information with "Zoom:" and handle the "Fit to window" case with rounded percentage display.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Improve zoom display in title bar' directly describes the main change: updating zoom status text display in the custom title bar with better formatting and information.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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: 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".

Comment thread faststack/qml/Main.qml
Comment on lines +355 to +356
if (Math.abs(ratio - 1.0) < 0.03) return "Zoom: Fit to window (" + Math.round(zs * 100) + "%)"
return "Zoom: " + Math.round(ratio * 100) + "%"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@AlanRockefeller AlanRockefeller merged commit 5e30def into main Mar 28, 2026
3 checks passed
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