mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Prevent big images from becoming square in overlay
This commit is contained in:
parent
02406bf999
commit
c9bcf3a7c0
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue