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:
parent
4c4603691f
commit
ecd7768c70
|
@ -5,7 +5,6 @@ CONFIG += warn_off c++11 release
|
|||
dev {
|
||||
CONFIG -= warn_off release
|
||||
CONFIG += debug
|
||||
message($$CONFIG)
|
||||
}
|
||||
|
||||
BUILD_DIR = build
|
||||
|
|
|
@ -73,15 +73,12 @@ QtObject {
|
|||
}
|
||||
|
||||
readonly property QtObject message: QtObject {
|
||||
property color ownBackground: Qt.hsla(0.07, 0.4, 0.82, 0.7)
|
||||
property color background: colors.background1
|
||||
property color body: colors.foreground
|
||||
property color date: colors.foregroundDim
|
||||
}
|
||||
|
||||
readonly property QtObject event: QtObject {
|
||||
property color background: Qt.darker(colors.background1, 1.1)
|
||||
}
|
||||
|
||||
readonly property QtObject daybreak: QtObject {
|
||||
property color background: colors.background1
|
||||
property color foreground: colors.foreground
|
||||
|
@ -132,5 +129,5 @@ QtObject {
|
|||
property real lightness: 0.3
|
||||
}
|
||||
|
||||
property int bottomElementsHeight: 32
|
||||
property int bottomElementsHeight: 36
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -76,10 +76,11 @@ Item {
|
|||
)
|
||||
}
|
||||
|
||||
Component.onCompleted: initialRoomTimer.start()
|
||||
Timer {
|
||||
// TODO: remove this, debug
|
||||
id: initialRoomTimer
|
||||
interval: 5000
|
||||
interval: 3000
|
||||
repeat: false
|
||||
onTriggered: pageStack.showRoom(
|
||||
"@test_mary:matrix.org",
|
||||
|
|
Loading…
Reference in New Issue
Block a user