Limit max memory usage of images

This commit is contained in:
Nicolas Werner 2021-12-08 01:46:40 +01:00
parent 07b5f0805f
commit d409bab838
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,8 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.12
import QtQuick 2.15
import QtQuick.Window 2.15
import im.nheko 1.0
Item {
@ -46,6 +47,8 @@ Item {
smooth: true
mipmap: true
sourceSize.width: Math.min(Screen.desktopAvailableWidth, originalWidth || undefined)
sourceSize.height: Math.min(Screen.desktopAvailableHeight, originalWidth*proportionalHeight || undefined)
}
MxcAnimatedImage {