Change how our own messages are displayed

Avatar and name won't be shown for our messages
(the avatar is still visible in sendbox), but they will have a different
background color.

Also make bottom UI elements 36px tall, for avatars to match size with
the rest of the UI.
This commit is contained in:
miruka
2019-07-05 21:26:22 -04:00
parent 4c4603691f
commit ecd7768c70
4 changed files with 10 additions and 10 deletions

View File

@@ -13,11 +13,13 @@ Row {
hidden: combine
name: senderInfo.displayName || Utils.stripUserId(model.senderId)
dimension: model.showNameLine ? 48 : 28
visible: ! isOwn
}
Rectangle {
color: Utils.eventIsMessage(model) ?
HStyle.chat.message.background : HStyle.chat.event.background
color: isOwn?
HStyle.chat.message.ownBackground :
HStyle.chat.message.background
//width: nameLabel.implicitWidth
width: Math.min(
@@ -36,7 +38,8 @@ Row {
HLabel {
width: parent.width
height: model.showNameLine && ! combine ? implicitHeight : 0
height: model.showNameLine && ! isOwn && ! combine ?
implicitHeight : 0
visible: height > 0
id: nameLabel