Skip to content

Zoom out from Fit goes to the step below the scale Fit shows (#307) - #308

Merged
danjboyd merged 1 commit into
mainfrom
fix-307-zoom-out-from-fit
Oct 20, 2026
Merged

danjboyd merged 1 commit into
mainfrom
fix-307-zoom-out-from-fit

Conversation

@danjboyd

Copy link
Copy Markdown
Owner

Fixes #307, for 0.3.2 (Dan: zoom-out fix only).

-zoomOut: went to a fixed 50% while Fit was on. With Fit below 50%, the first press of zoom out zoomed in: a large screenshot in a narrow window, which #303's 600 pt Windows minimum makes more common. It now uses nextZoomScaleBelow: on the scale shown, as it already did with Fit off:

  • Fit at 33% gives 25%.
  • Fit between 50% and 100% gives 50%, as before.
  • Below 25% it keeps shrinking by 1.25×, down to 5%.

Zoom in from Fit is unchanged: it goes to 100%.

Tests (FitToWindowProbe)

  • testZoomOutFromAFitBelowHalfGoesLower fails on main ("0.5 ≥ 0.315").
  • testZoomOutFromAFitAboveHalfGoesToTheNextStepDown.
  • testZoomInFromFitGoesToActualSize.
  • The full suite passes: 63 suites under both themes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V8rjzo3Qk8M7WcT9RYfYRW

It went to a fixed 50%, so with Fit below 50% (a large screenshot in a
narrow window) the first press of zoom out zoomed in. It now uses the step
below the current scale, as it does when Fit is off. With Fit between 50%
and 100% that is still 50%. Zoom in from Fit still goes to 100%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8rjzo3Qk8M7WcT9RYfYRW
@danjboyd

Copy link
Copy Markdown
Owner Author

Windows: GO. Tested preview 0.3.1-pr308 (run 39494608450, 9aa162c) on Windows 11 at 150% scaling, with a 2580×1560 image and the status bar's − / + (posted clicks). The zoom label was read from captures after each step.

Case Window Steps Result
(1) Fit below 50% minimum width (main's, 960 px visible) Fit, −, − 34.4% → 25% → 20%: down both times
(2) zoom in from Fit minimum width Fit, + 34.4% → 100%
(3) Fit between 50% and 100% default window Fit, − 68.1% → 50%

On 0.3.1-pr303c (without this fix), the same case (1) went 33.4% → 50% → 25% (#307).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Px6i2CANZszJmJLzAZHoBQ

@danjboyd
danjboyd marked this pull request as ready for review October 20, 2026 21:03
@danjboyd
danjboyd merged commit fc6225a into main Oct 20, 2026
5 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.

Zoom out from Fit goes up to 50% when Fit is below 50%

1 participant