diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-08 01:46:40 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-08 02:43:08 +0100 |
commit | d409bab838268b9dd88de4539b0b137f6afdb9b9 (patch) | |
tree | 727ee07af00b8f58d10b7b9fcc2dec4bc8569d97 /resources/qml/delegates | |
parent | Fix display of images, that can't be thumbnailed (diff) | |
download | nheko-d409bab838268b9dd88de4539b0b137f6afdb9b9.tar.xz |
Limit max memory usage of images
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r-- | resources/qml/delegates/ImageMessage.qml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml index 4caa89ab..71c7bcc6 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml @@ -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 { |