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 {
|
dev {
|
||||||
CONFIG -= warn_off release
|
CONFIG -= warn_off release
|
||||||
CONFIG += debug
|
CONFIG += debug
|
||||||
message($$CONFIG)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
|
|
|
@ -73,15 +73,12 @@ QtObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property QtObject message: 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 background: colors.background1
|
||||||
property color body: colors.foreground
|
property color body: colors.foreground
|
||||||
property color date: colors.foregroundDim
|
property color date: colors.foregroundDim
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property QtObject event: QtObject {
|
|
||||||
property color background: Qt.darker(colors.background1, 1.1)
|
|
||||||
}
|
|
||||||
|
|
||||||
readonly property QtObject daybreak: QtObject {
|
readonly property QtObject daybreak: QtObject {
|
||||||
property color background: colors.background1
|
property color background: colors.background1
|
||||||
property color foreground: colors.foreground
|
property color foreground: colors.foreground
|
||||||
|
@ -132,5 +129,5 @@ QtObject {
|
||||||
property real lightness: 0.3
|
property real lightness: 0.3
|
||||||
}
|
}
|
||||||
|
|
||||||
property int bottomElementsHeight: 32
|
property int bottomElementsHeight: 36
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,13 @@ Row {
|
||||||
hidden: combine
|
hidden: combine
|
||||||
name: senderInfo.displayName || Utils.stripUserId(model.senderId)
|
name: senderInfo.displayName || Utils.stripUserId(model.senderId)
|
||||||
dimension: model.showNameLine ? 48 : 28
|
dimension: model.showNameLine ? 48 : 28
|
||||||
|
visible: ! isOwn
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: Utils.eventIsMessage(model) ?
|
color: isOwn?
|
||||||
HStyle.chat.message.background : HStyle.chat.event.background
|
HStyle.chat.message.ownBackground :
|
||||||
|
HStyle.chat.message.background
|
||||||
|
|
||||||
//width: nameLabel.implicitWidth
|
//width: nameLabel.implicitWidth
|
||||||
width: Math.min(
|
width: Math.min(
|
||||||
|
@ -36,7 +38,8 @@ Row {
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: model.showNameLine && ! combine ? implicitHeight : 0
|
height: model.showNameLine && ! isOwn && ! combine ?
|
||||||
|
implicitHeight : 0
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
|
|
||||||
id: nameLabel
|
id: nameLabel
|
||||||
|
|
|
@ -76,10 +76,11 @@ Item {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: initialRoomTimer.start()
|
||||||
Timer {
|
Timer {
|
||||||
// TODO: remove this, debug
|
// TODO: remove this, debug
|
||||||
id: initialRoomTimer
|
id: initialRoomTimer
|
||||||
interval: 5000
|
interval: 3000
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: pageStack.showRoom(
|
onTriggered: pageStack.showRoom(
|
||||||
"@test_mary:matrix.org",
|
"@test_mary:matrix.org",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user