Description
When viewing an image with the image viewer, it does not always retain the image's correct aspect ratio
on certain combinations of the image size and the size of the window it is displayed on. One can
reproduce it for example by opening an image sized 700x1200 pixel and resize the window around
640x480 pixel (maybe one must try a bit to find the exact size(es)).
The attatched patch should fix this.
Additionally the patch
- removes the first if-clause because this case can be handled by the second one.
- remove the position calculations from the if-blocks and place a single one after the if-cases.
- remove the last case, because it shouldn't be needed anymore.