-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix zoom ratio calculation #364
Conversation
Hmm. I'm happy that someone is attempting a cleanup of this mess, though this still needs some testing (and, possibly, polishing). Right now the first slide of a Expect delays though, I don't have much time at the moment. |
I absolutely agree.
No problem. We don't have to rush this. |
|
a78debb
to
1171a50
Compare
@derf This is ready for a second review. |
hmm, this still causes some behaviour changes in feh. fullscreen mode no longer zooms out images which are too large, and due to the re-use of the geometry flags settings leaving fullscreen mode will cause non-tiling feh windows to be as big as the screen (instead of fitted to the size of the image, which is usually smaller). Also, in non-tiling mode, feh will no longer resize its window when changing images. I've yet to decide which of these I consider to be an issue and which I don't (and do more testing), so this is just the current status to make sure i don't forget it. |
4b4c501
to
7245722
Compare
I modified this condition in order to replicate the old behavior: 9d959f0#diff-24777376c7590882b07457017fd284ceR459
Both of this happened because I enabled fixed geometry mode by default in order to avoid the flickering in tiling windows: 203e8ff#diff-24777376c7590882b07457017fd284ceL326 I have now replaced this code change with a slightly modified version of the original code: 66a1eb8 Flickering in tiling window mode can now be circumvented by passing an empty string to the |
This simplifies the logic behind the automatic zoom ratio calculation, which is used by both --auto-zoom and --scale-down.
Passing an empty string to the --geometry option will enable fixed geometry mode without having to specify anything else
--keep-zoom-vp will no longer block the dynamic window resizing mechanism.
e7050e0
to
f7363e3
Compare
Please let me know if there is anything I can do to help you make this pull request ready for merge. |
Actually, just poking me again was sufficient. I couldn't find any issues with this version :) Thanks a lot for the patches and sorry for the long wait! |
This simplifies the logic behind the automatic zoom ratio calculation, which is used by both
--auto-zoom
and--scale-down
.When merged this will:
w
command when both--scale-down
and--keep-zoom-vp
are enabled--auto-zoom
not being triggered on window resize events when--scale-down
is enabled--auto-zoom
not being applied to the first image--auto-zoom
conflicting with manual zoom--zoom <percent> --auto-zoom
logic according to theman feh
descriptionfeh_draw_checks
not taking the zoom level into account properlyfeh_draw_checks
being called before the zoom level is adjusted--zoom <percent>
from blocking--scale-down
in fullscreen / fixed geometry mode--keep-zoom-vp
from blocking the dynamic window resizing mechanism--keep_zoom_vp
is enabledwinwid-> im_x
andwinwid-> im_y
from being set to invalid values(when switching between images of different sizes)
--keep-zoom-vp
is handled internallyFixes: #229
Fixes: #244
Fixes: #307
Closes: #358
Closes: #361
Closes: #362