~fboucault/address-book-app/discard_edit_confirmation

« back to all changes in this revision

Viewing changes to src/imports/Ubuntu/Contacts/ContactAvatar.qml

  • Committer: Florian Boucault
  • Date: 2015-09-23 13:00:50 UTC
  • Revision ID: florian.boucault@canonical.com-20150923130050-9f0iei0z5wwcfqev
Fixed wrong aspect ratio when using UbuntuShape.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    }
58
58
 
59
59
    source: !img.visible ? img : null
 
60
    sourceFillMode: UbuntuShape.PreserveAspectCrop
60
61
 
61
62
    Image {
62
63
        id: img
65
66
        property string avatarUrl: ContactsJS.getAvatar(contactElement, fallbackAvatarUrl)
66
67
 
67
68
        anchors.centerIn: visible ? avatar : undefined
68
 
        fillMode: Image.PreserveAspectCrop
69
69
        asynchronous: true
70
70
        source: avatar.showAvatarPicture ? avatar.avatarUrl : ""
71
71
        height: visible ? units.gu(3) : avatar.height