-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable smooth scaling at high zoom levels #735
Open
jdpurcell
wants to merge
12
commits into
jurplel:master
Choose a base branch
from
jdpurcell:pr-issue356
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Ability to make the zoom level relative to physical screen pixels
Eliminates the need for overscan and ensures that no unnecessary scaling takes place when window matches image size.
Calculated aspect ratio was slightly off in some cases. Also enforce minimum window size in both dimensions.
* Original size can toggle between 100% and zoom-to-fit. * Minimum window size just requires one dimension to be over the minimum.
jdpurcell
force-pushed
the
pr-issue356
branch
from
December 22, 2024 03:19
6e98981
to
1496c16
Compare
Having it inverted is just another potential source of rounding errors.
Qt makes this difficult by not providing access to the native geometry.
jdpurcell
force-pushed
the
pr-issue356
branch
from
December 26, 2024 15:38
1496c16
to
917f532
Compare
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.
Implements #356. This is based on #699 hence the extra commits / large diff unrelated to this change. This should clean up after (if?) #699 gets merged, but in the meantime, if you want to see what changed here, just look at the last commit.
I cleaned up the scaling settings UI because it doesn't make sense to me that someone would have the "Image scaling" setting checked but "Bilinear filtering" unchecked. The only use case I can think of for that combination is as a really terrible workaround for not having the ability to disable smooth scaling at high zoom levels, which this (obviously) now solves. I say terrible because the threshold at which "Image scaling" turns off is based on how far the image is zoomed in relative to the viewport size, rather than what I would call the true zoom level (relative to the image's original size).
I didn't make the threshold configurable in the UI; well I initially did but decided it looked bad, so went with a fixed value to keep things clean and simple. It goes through
SettingsManager
at least so someone could change it in the Registry or whatever if they really wanted.