Repository navigation
Add option to zoom out past best fit - #98
Open
Omegadarling wants to merge 1 commit into
Open
Omegadarling wants to merge 1 commit into
Omegadarling wants to merge 1 commit into
Conversation
Zooming out at best fit now keeps shrinking the image in 0.8x steps, so large images can be made smaller than best fit and small images smaller than 1:1. It stops before the image would be under 32 pixels on both sides. - Zooming in steps back up through the shrink levels to best fit, then enlarges as before. - Best Fit, Zoom Reset and loading another image return to best fit. - 1:1 remembers the shrink level and restores it when 1:1 is turned off. - When no zoom level is smaller than 1:1 (images that fit the window), zooming out of 1:1 goes to best fit if that is smaller, otherwise to the first shrink level smaller than 1:1. Images too small to shrink stay at 1:1. Larger images still step down to the nearest zoom level below 1:1 as before. - Leaving 1:1 by zooming out now always redraws; before, landing on best fit could leave the 1:1 frame on screen. - Works with View > Allow Shrinking turned off, since zooming out is an explicit request. The option is on by default and can be turned off in Options > View > "Allow zooming out past best fit" (ini: zoom_out_past_best_fit). Turning it off returns to best fit. Notes for merging: - master does not build until one of the open build-fix pull requests (88 or 95) lands. The new control ID is 1068 so it does not collide with the IDs those add (1055-1066). The companion "Escape closes the viewer" pull request uses 1067. - res/voidImageViewer.rc will conflict with 88/95 in IDD_VIEW, because they rename the IDs on the lines this change moves down. The right resolution keeps their IDs (IDC_CACHE_LAST_IMAGE_STATIC, IDC_*BACKGROUNDCOLOR_STATIC and _BUTTON) with this change's positions: the checkbox at 0,119 after "Cache &last image", and the background color labels and buttons at y 139/137 and 157/155. Taking their side whole drops the checkbox, which silently turns the option off every time Options is closed with OK. I'm happy to rebase once a build fix is merged. - The Chinese label is a best-effort translation and may need a native speaker's review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zooming out at best fit now keeps shrinking the image in 0.8x steps, so large images can be made smaller than best fit and small images smaller than 1:1. It stops before the image would be under 32 pixels on both sides.
The option is on by default and can be turned off in Options > View > "Allow zooming out past best fit" (ini:
zoom_out_past_best_fit). Turning it off returns to best fit.Notes for merging
res/voidImageViewer.rcwill conflict with 88/95 inIDD_VIEW, because they rename the IDs on the lines this change moves down. The right resolution keeps their IDs (IDC_CACHE_LAST_IMAGE_STATIC,IDC_*BACKGROUNDCOLOR_STATICand_BUTTON) with this change's positions: the checkbox at 0,119 after "Cache &last image", and the background color labels and buttons at y 139/137 and 157/155. Taking their side whole drops the checkbox, which silently turns the option off every time Options is closed with OK. I'm happy to rebase once a build fix is merged.🤖 Generated with Claude Code