Restyle the chat UI
This commit is contained in:
@@ -11,5 +11,5 @@ Base.HLabel {
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
|
||||
font.bold: true
|
||||
font.weight: Font.DemiBold
|
||||
}
|
||||
|
@@ -8,6 +8,8 @@ Base.HGlassRectangle {
|
||||
id: sidePane
|
||||
clip: true // Avoid artifacts when resizing pane width to minimum
|
||||
|
||||
isPageStackDescendant: false
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
@@ -19,21 +19,16 @@ function getLastRoomEventText(roomId, accountId) {
|
||||
var undecryptable = ev.type === "OlmEvent" || ev.type === "MegolmEvent"
|
||||
|
||||
if (undecryptable || ev.type.startsWith("RoomMessage")) {
|
||||
var color = ev.dict.sender === roomList.forUserId ?
|
||||
"darkblue" : "purple"
|
||||
var color = Qt.hsla(Backend.hueFromString(name), 0.32, 0.3, 1)
|
||||
|
||||
return "<font color='" +
|
||||
color +
|
||||
"'>" +
|
||||
return "<font color='" + color + "'>" +
|
||||
name +
|
||||
":</font> " +
|
||||
(undecryptable ?
|
||||
"<font color='darkred'>Undecryptable<font>" :
|
||||
"<font color='darkred'>" + qsTr("Undecryptable") + "<font>" :
|
||||
ev.dict.body)
|
||||
} else {
|
||||
return "<font color='" +
|
||||
(undecryptable ? "darkred" : "#444") +
|
||||
"'>" +
|
||||
return "<font color='" + (undecryptable ? "darkred" : "#444") + "'>" +
|
||||
name +
|
||||
" " +
|
||||
ChatJS.getEventText(ev.type, ev.dict) +
|
||||
|
Reference in New Issue
Block a user