Fit to window doesn't work on qt6
Settings:
Result:
Fit to window actually makes the image much smaller than the window for me, always, aspect ratio of the image itself vs window doesn't seem to matter much at all.
Even if I use the automatic resize setting, image will still be a lot smaller than the window, it's like qimgv doesn't properly recognize the size of the window, maybe cuz I'm on wayland or something?
Edit: I've found out that it's related to qt6ct somehow, i tried both of the qimgv qt6ct versions in AUR and had this issue, i tried the qt5ct version and it's fine there, although that version opens videos in a separate window.
From your settings where it says "Expand images, up to" "4x". That's the limit you set for it to expand to. Only 4x it's original resolution.
If you move that slider all the way to the left to set it to "-" nothing. It will fill the window by the longest dimension.
From your settings where it says "Expand images, up to" "4x". That's the limit you set for it to expand to. Only 4x it's original resolution.
If you move that slider all the way to the left to set it to "-" nothing. It will fill the window by the longest dimension.
The image i used in my examlpe is 4k, my monitor is only 1440p. The image is displayed at 36% of it's original size, no matter what I set it to.
Last thing you could try is uncheck "Unlock Minimum Zoom". That prevents the zoom level going anything below the window size. So it lets you zoom in but not zoom out.
I'm also having this problem while in Plasma Wayland and using Qt6 builds. The Qt5 builds are unaffected by this. And Plasma X11 doesn't get affected by either Qt versions.
What's even more interesting is that if I adjust my monitor scaling to 1.0 (instead of 1.5 which is what I use), it solves the problem. Though not ideal for me when I'm using 4K monitors.
I just realized that a suitable workaround would be to launch qimgv with QT_QPA_PLATFORM=xcb as its local environment variable while in Wayland.
I just realized that a suitable workaround would be to launch qimgv with
QT_QPA_PLATFORM=xcbas its local environment variable while in Wayland.
Won't that just run it on xwayland? I'm not actually having this problem right now but it's probably because my display scaling is set to 1.0 atm. There was something else though, I was having some scaling issues with qt apps and I had an environment variable i used to resolve that which might help with this.
QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
@Rabcor That environment variable works for me! Thanks for sharing that solution.
The reason I was using Xwayland was because the problem doesn't occur for me while in X11. So I thought that would be the workaround to use. But using QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor is way better! 👍
Yeah, this is a problem with qt itself I think.