status-desktop/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/UserImage.qml

43 lines
1.2 KiB
QML
Raw Normal View History

import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
Loader {
active: isMessage
height: active ? item.height : 0
sourceComponent: Component {
2020-11-30 17:03:52 +00:00
Item {
id: chatImage
width: identiconImage.width
height: identiconImage.height
2020-11-30 17:03:52 +00:00
RoundedImage {
id: identiconImage
width: 36
height: 36
2020-11-30 17:03:52 +00:00
border.width: 1
border.color: Style.current.border
source: {
if (profileImageSource) {
return profileImageSource
}
identiconImage.showLoadingIndicator = false
2020-11-30 17:03:52 +00:00
return !isCurrentUser ? identicon : profileModel.profile.identicon
}
smooth: false
antialiasing: true
MouseArea {
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: parent
onClicked: {
clickMessage(true)
}
}
}
}
}
}