uiux: apply rounded corners to images from image URLs

This commit is contained in:
Pascal Precht 2020-11-13 14:16:49 +01:00 committed by Jonathan Rainville
parent be2aadb4e2
commit 47a561daf4
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import "../../../../../imports"
Rectangle {
property int chatVerticalPadding: 12
property int chatHorizontalPadding: 12
property bool isCurrentUser: bool
signal clicked(string source)
id: imageChatBox
@ -14,7 +15,7 @@ Rectangle {
}
return h + chatVerticalPadding * imageRepeater.count
}
color: isCurrentUser ? Style.current.blue : Style.current.lightBlue
color: "transparent"
border.color: "transparent"
width: {
let w = 0
@ -44,6 +45,7 @@ Rectangle {
anchors.topMargin: verticalPadding
anchors.horizontalCenter: parent.horizontalCenter
source: modelData
isCurrentUser: imageChatBox.isCurrentUser
onClicked: {
imageChatBox.clicked(source)
}

View File

@ -219,6 +219,7 @@ Item {
Component {
id: imageComponent
ImageMessage {
isCurrentUser: messageItem.isCurrentUser
onClicked: {
chatTextItem.clickMessage(false, false, true, source)
}