Skip to content
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
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jdpurcell
Copy link
Contributor

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.

image

jdpurcell added 8 commits July 6, 2024 15:41
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 jdpurcell marked this pull request as draft December 23, 2024 03:17
Having it inverted is just another potential source of rounding errors.
Qt makes this difficult by not providing access to the native geometry.
@jdpurcell jdpurcell marked this pull request as ready for review December 26, 2024 15:38
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