On small and medium-sized screens, take physical monitor size into consideration when auto-scaling window
In the initial implementation in issue #16 (closed), it was suggested to simply go for 30% screen area by default, which sort of works if you have a humongous 29 to 42" screen, but certainly isn't very practical on a 12-14" non-HiDPI laptop screen (let alone a phone/tablet screen) when you want to see details in your photos and your eyes are tired.
Current behavior
For instance, on my 14" 1920x1080 laptop screen, opening a 2000x1351 pixels image, this is what happens (take notice of the Nautilus zoomed-in thumbnails grid in the background):
...the resulting opened image is impractically small:
- It is barely twice the size of its thumbnail!
Because of that, this unfortunately reduces Loupe's value proposition over Nautilus for viewing images. If I wanted only barely-bigger-than-thumbnail previewing, I'd be using Nautilus' "Sushi" companion app... ironically, in the case of this particular image, even Sushi opens at a bigger size than Loupe, and when you click its "Open in image viewer" button, it then opens up in Loupe... smaller than Sushi. - On my laptop screen, Loupe's opened image is around 5 centimeters tall or so, and that's hard on the eyes. Kind of an accessibility feature for me.
Proposed solution
I have a physically tiny screen, so the app should try to optimize for its display real estate.
I would have expected something like this, in that case (and for pretty much any screen dimension smaller than, say, 60 centimeters):
I'd think the auto-sizing calculation percentage, instead of being fixed at 30%, should have either a proportion calculated pro-rata based on physical dimensions of the monitor (in addition to the image's resolution). Maybe the trick could be to "allow up to 80-90% of screen dimension, up to a certain physical size", then when reaching the certain screen sizes, cap the image size to degressive portions: 66, 50, 30%... I'm not entirely sure how that would work (with width vs height and the image aspect ratio) but probably something can be done differently for very large screens vs small/medium-sized screens.
This might also partially mitigate one of the side-effects (double-letterboxing) observed in #218 (comment 1852183) ...