fix(desktop/profile): Exposing cropping parameters to InsertDetailsView
Fix #5238
This commit is contained in:
parent
f067d59612
commit
4b6c113b85
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue