fix(desktop/profile): Exposing cropping parameters to InsertDetailsView

Fix #5238
This commit is contained in:
Michal Iskierko 2022-04-08 11:49:32 +02:00 committed by Iuri Matias
parent f067d59612
commit 4b6c113b85
2 changed files with 8 additions and 5 deletions

View File

@ -12,18 +12,20 @@ import shared.popups 1.0
StatusModal {
id: popup
height: 510
header.title: qsTr("Upload profile picture")
readonly property alias aX: cropImageModal.aX
readonly property alias aY: cropImageModal.aY
readonly property alias bX: cropImageModal.bX
readonly property alias bY: cropImageModal.bY
property string selectedImage
property string uploadError
signal accepted()
onOpened: {
selectedImage = ""
}
contentItem: Item {
anchors.fill: parent
RoundedImage {

View File

@ -92,6 +92,7 @@ Item {
type: StatusFlatRoundButton.Type.Secondary
icon.name: "add"
onClicked: {
uploadProfilePicPopup.selectedImage = userImage.image.source
uploadProfilePicPopup.open();
}
}
@ -180,7 +181,7 @@ Item {
id: uploadProfilePicPopup
anchors.centerIn: parent
onAccepted: {
userImage.image.source = uploadProfilePicPopup.selectedImage
userImage.image.source = selectedImage
OnboardingStore.uploadImage(selectedImage, aX, aY, bX, bY);
}
}