confirm upload popups: limit size of loaded images

This commit is contained in:
miruka 2020-07-16 17:29:49 -04:00
parent 1708f692b3
commit 6065b6c1d6
3 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,7 @@ HColumnPopup {
source: "image://clipboard/" + updateCounter source: "image://clipboard/" + updateCounter
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
sourceSize.width: popup.contentWidthLimit
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true

View File

@ -49,6 +49,7 @@ HColumnPopup {
source: popup.filePath source: popup.filePath
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: status !== Image.Error visible: status !== Image.Error
sourceSize.width: popup.contentWidthLimit
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true

View File

@ -8,6 +8,8 @@ HPopup {
default property alias pageData: page.columnData default property alias pageData: page.columnData
property int contentWidthLimit: theme.controls.popup.defaultWidth
readonly property alias page: page readonly property alias page: page
signal keyboardAccept() signal keyboardAccept()
@ -16,8 +18,7 @@ HPopup {
HColumnPage { HColumnPage {
id: page id: page
implicitWidth: Math.min( implicitWidth: Math.min(
popup.maximumPreferredWidth, popup.maximumPreferredWidth, popup.contentWidthLimit,
theme.controls.popup.defaultWidth,
) )
implicitHeight: Math.min( implicitHeight: Math.min(
popup.maximumPreferredHeight, popup.maximumPreferredHeight,