Skip to content
Snippets Groups Projects
Verified Commit c9bcf3a7 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Prevent big images from becoming square in overlay

parent 02406bf9
No related branches found
No related tags found
No related merge requests found
Pipeline #5658 waiting for manual action
......@@ -51,8 +51,8 @@ Window {
property int imgSrcWidth: (imageOverlay.originalWidth && imageOverlay.originalWidth > 100) ? imageOverlay.originalWidth : Screen.width
property int imgSrcHeight: imageOverlay.proportionalHeight ? imgSrcWidth * imageOverlay.proportionalHeight : Screen.height
height: Math.min(parent.height || Screen.height, imgSrcHeight)
width: Math.min(parent.width || Screen.width, imgSrcWidth)
height: imgSrcHeight
width: imgSrcWidth
x: (parent.width - width) / 2
y: (parent.height - height) / 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment