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

Images do not take up entire screen when in fullscreen using Fit to Window #564

Open
HelmicNewciv opened this issue Oct 1, 2024 · 6 comments

Comments

@HelmicNewciv
Copy link

When in windowed mode, images will initially open and properly fit in window, assuming they're of sufficient resolution. But as soon as I go to the next image in a folder, or if I switch to or start in fullscreen, there's instead very large margins on all sides of the image. This occurs even when the image is above 4k on a 4k monitor.

On a similar note, I would like a way to force images to always fit in the screen regardless of size, or to otherwise set a size under which they no longer stretch to fit the window. The current option seems to just limit the screen space an image will take up to x4, regardless of starting resolution, which is annoying on high resolution displays.

@soul4feels
Copy link

Screenshot 2024-10-06 081127

Those 2 options will solve your issues. First red circle, for fitting image to window. Second red circle is what is causing your margins. It expands smaller images to fit window but can be adjusted to have a limit of how much. Which is what is causing your margins. Move it all the way to the left to have no margins.

@HelmicNewciv
Copy link
Author

HelmicNewciv commented Oct 8, 2024

Those are my settings, yes. I've experimented with different values to see what the problem might be. I tried other fit modes as well - stretching to width still has margins on the sides of the image, even for very large images, but it won't have the vertical margins. Videos are not impacted and will fit to screen correctly. I'm using the qimgv-qt6-kde-git package from the AUR. Here's a copy of qimgv.conf:

[General]
JPEGSaveQuality=95
autoResizeLimit=100
autoResizeWindow=false
backgroundOpacity=1
blurBackground=true
confirmDelete=true
confirmTrash=true
cursorAutohiding=true
defaultCropAction=0
defaultFitMode=0
defaultViewMode=0
drawTransparencyGrid=false
enableSmoothScroll=true
expandImage=true
expandLimit=0
firstRun=false
fixedZoomLevels="0.05,0.1,0.125,0.166,0.25,0.333,0.5,0.66,1,1.5,2,3,4,5,6,7,8"
focusPointIn1to1Mode=0
folderEndAction=0
folderViewIconSize=120
imageScrolling=2
infoBarFullscreen=false
infoBarWindowed=false
jxlAnimation=false
keepFitMode=false
language=en_US
lastVerMajor=1
lastVerMicro=3
lastVerMinor=0
loopSlideshow=false
memoryAllocationLimit=1024
mpvBinary=/usr/bin/mpv
openInFullscreen=false
panelCenterSelection=false
panelEnabled=false
panelFullscreenOnly=true
panelPinned=false
panelPosition=top
panelPreviewsSize=140
playVideoSounds=true
scalingFilter=3
showSaveOverlay=true
slideshowInterval=3000
smoothAnimatedImages=true
smoothUpscaling=true
sortFolders=true
sortingMode=0
squareThumbnails=false
thumbPanelStyle=1
thumbnailCache=true
thumbnailerThreads=4
trackpadDetection=true
unloadThumbs=true
unlockMinZoom=true
useFixedZoomLevels=false
usePreloader=true
useSystemColorScheme=true
videoPlayback=true
windowTitleExtendedInfo=true
zoomIndicatorMode=0
zoomStep=0.20000000298023224

[Controls]
shortcuts="zoomIn=+", "frameStepBack=,", "zoomOut=-", "frameStep=.", "fitWindow=1", "fitWidth=2", "fitNormal=3", "zoomIn=eq", "exit=Alt+X", "folderView=Backspace", "copyFile=C", "zoomIn=Ctrl++", "zoomOut=Ctrl+-", "zoomIn=Ctrl+eq", "copyFileClipboard=Ctrl+C", "showInDirectory=Ctrl+D", "zoomOut=Ctrl+Down", "rotateLeft=Ctrl+L", "seekVideoBackward=Ctrl+Left", "open=Ctrl+O", "print=Ctrl+P", "exit=Ctrl+Q", "rotateRight=Ctrl+R", "seekVideoForward=Ctrl+Right", "save=Ctrl+S", "copyPathClipboard=Ctrl+Shift+C", "saveAs=Ctrl+Shift+S", "zoomIn=Ctrl+Up", "pasteFile=Ctrl+V", "setWallpaper=Ctrl+W", "zoomOutCursor=Ctrl+WheelDown", "zoomInCursor=Ctrl+WheelUp", "discardEdits=Ctrl+Z", "toggleShuffle=Ctrl+`", "moveToTrash=Del", "scrollDown=Down", "jumpToLast=End", "folderView=Enter", "closeFullScreenOrExit=Esc", "toggleFullscreen=F", "toggleFullscreen=F11", "renameFile=F2", "reloadImage=F5", "flipH=H", "jumpToFirst=Home", "toggleImageInfo=I", "toggleFullscreen=LMB_DoubleClick", "prevImage=Left", "moveFile=M", "contextMenu=Menu", "exit=MiddleButton", "openSettings=P", "resize=R", "contextMenu=RMB", "nextImage=Right", "removeFile=Shift+Del", "toggleFullscreenInfoBar=Shift+F", "prevDirectory=Shift+Left", "nextDirectory=Shift+Right", "toggleFitMode=Space", "scrollUp=Up", "flipV=V", "nextImage=WheelDown", "prevImage=WheelUp", "crop=X", "prevImage=XButton1", "nextImage=XButton2", "toggleSlideshow=`"

[Scripts]
script\size=0

@soul4feels
Copy link

Okay. Now I'm confused at what option you are looking for. I'm only a user, so the scope my help is limited. Maybe a screenshot will help. Send screenshot of what you expect to happen maybe in another app and what is happening in the qimgv app.

And I'm on windows. So maybe the apps behaviors are a bit different since you're on KDE.

If you're looking for "Stretch to Fit". Which distorts and stretches the image to fit the window regardless of dimension. Which is usually undesired because it distorts the aspect ratio of the image. The app doesn't have it. Maybe using the right terminology would help. There's a few that exist.

Fill = Fills out window using shortest dimension of the image, preserves aspect ratio, crops image, no margins
Stretch = Stretches image to window, distorts aspect ratio, no crop, no margins
Fit = Fits image into window from longest dimension of image, preserves aspect ratio, no crop, has margins on shortest dimension
Fit to Width = Fits using the width of image to sides of window, preserves aspect ratio, can crop and can still have margins depending on
Fit to Height = Same as width but on the alternative dimension.
1:1 = actual size of image regardless of window size or anything. can crop can have margins, preserves aspect ratio

So which one of those are you looking for. Can only be 1. qimgv only has 3 of them.

@easymodo
Copy link
Owner

Ok I've just built the qimgv-qt6-kde-git from aur, and I just can't reproduce this... Fit window mode is working as expected, provided you set no limit for image expansion

Very strange. I'll also try on an external 2k monitor cause maybe the bug is resolution-dependant, but I doubt it

Could you post a screenshot of the issue?

@HelmicNewciv
Copy link
Author

HelmicNewciv commented Oct 12, 2024

This is the image as pulled from https://github.com/linuxdotexe/nordic-wallpapers/blob/4451bb432fc855159ab77a2ee41a0d4b8f60555a/wallpapers/ign_highTechGlobe.png which is a native 4k image on my 4k screen.

image

This is the image as pulled from https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fp2nkmgo6p3ud1.png which is an ultrawide wallpaper.

image

No matter the dimensions of the original image, it always opens with these margins. I'm able to then zoom as normal, but switching to "fit to screen" or just opening an image normally will have these margins.

Sometimes, but not consistently, an image that I just open as a window but not in fullscreen won't have the margins. But sometimes it does open with the margins. If I use the arrow keys to change to another image in the folder, it goes back to having the margins again.

image

image

@HelmicNewciv
Copy link
Author

After a recent update, qimv seems to no longer have the margins. I'm not sure what updated that might have changed this - maybe Krohnkite or Plasma? Nothing was changed in the configuration file, I updated my system yesterday and now today there's no issue.

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

No branches or pull requests

3 participants