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
fillMode: Image.PreserveAspectFit
sourceSize.width: popup.contentWidthLimit
Layout.fillWidth: true
Layout.fillHeight: true

View File

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

View File

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