fix(general): removed not working code for cropping tmp profile image

It was a source of warnings in the app and storybook.

Closes: #8519
This commit is contained in:
Michał Cieślak 2022-11-30 16:41:25 +01:00 committed by Michał
parent e635ccdc93
commit b64dcaa14f
4 changed files with 2 additions and 14 deletions

View File

@ -42,12 +42,7 @@ Loader {
color: root.asset.imgIsIdenticon ? color: root.asset.imgIsIdenticon ?
Theme.palette.statusRoundedImage.backgroundColor : Theme.palette.statusRoundedImage.backgroundColor :
root.asset.bgColor root.asset.bgColor
image.fillMode: root.asset.cropRect ? Image.PreserveAspectCrop image.fillMode: Image.PreserveAspectCrop
: Image.PreserveAspectFit
image.x: root.asset.cropRectangle ? -root.asset.cropRectangle.x
: 0
image.y: root.asset.cropRectangle ? -root.asset.cropRectangle.y
: 0
} }
Loader { Loader {
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -34,7 +34,4 @@ QtObject {
property bool isImage: false property bool isImage: false
property int imgStatus property int imgStatus
property bool imgIsIdenticon: false property bool imgIsIdenticon: false
// crop
property rect cropRect
} }

View File

@ -27,7 +27,7 @@ Item {
property bool isContact: false property bool isContact: false
property bool isCurrentUser property bool isCurrentUser
property bool userIsEnsVerified property bool userIsEnsVerified
property rect cropRect: undefined property rect cropRect
property int imageSize: ProfileHeader.ImageSize.Compact property int imageSize: ProfileHeader.ImageSize.Compact
property bool displayNameVisible: true property bool displayNameVisible: true
@ -83,7 +83,6 @@ Item {
imageWidth: d.getSize(36, 64, 160) imageWidth: d.getSize(36, 64, 160)
imageHeight: imageWidth imageHeight: imageWidth
showRing: !root.userIsEnsVerified showRing: !root.userIsEnsVerified
cropRect: root.cropRect
} }
StatusRoundButton { StatusRoundButton {

View File

@ -20,8 +20,6 @@ Loader {
property bool interactive: true property bool interactive: true
property bool disabled: false property bool disabled: false
property rect cropRect: undefined
property int colorId: Utils.colorIdForPubkey(pubkey) property int colorId: Utils.colorIdForPubkey(pubkey)
property var colorHash: Utils.getColorHashAsJson(pubkey) property var colorHash: Utils.getColorHashAsJson(pubkey)
@ -36,7 +34,6 @@ Loader {
name: root.image name: root.image
charactersLen: 2 charactersLen: 2
isImage: true isImage: true
cropRect: root.cropRect
} }
ringSettings { ringSettings {
ringSpecModel: root.showRing ? root.colorHash : undefined ringSpecModel: root.showRing ? root.colorHash : undefined