Add message echo/read counter color theme property

This commit is contained in:
miruka 2020-09-15 14:55:03 -04:00
parent d7d111705f
commit 5ce30d6019
3 changed files with 10 additions and 8 deletions

View File

@ -35,9 +35,9 @@ HRowLayout {
property string contentText: utils.processedEventText(model) property string contentText: utils.processedEventText(model)
readonly property string timeText: utils.formatTime(model.date, false) readonly property string timeText: utils.formatTime(model.date, false)
readonly property string readInfoText: readonly property string stateText:
`<font size=${theme.fontSize.small}px ` + `<font size=${theme.fontSize.small}px ` +
`color=${theme.chat.message.date}>` + ( `color=${theme.chat.message.serverState}>` + (
model.is_local_echo ? `&nbsp;` : model.is_local_echo ? `&nbsp;` :
model.read_by_count ? `&nbsp;⦿&nbsp;${model.read_by_count}` : model.read_by_count ? `&nbsp;⦿&nbsp;${model.read_by_count}` :
"" ""
@ -170,7 +170,7 @@ HRowLayout {
timeText + timeText +
"</font>" + "</font>" +
readInfoText stateText
transform: Translate { x: xOffset } transform: Translate { x: xOffset }
@ -317,7 +317,7 @@ HRowLayout {
mediaUrl: modelData mediaUrl: modelData
showSender: pureMedia ? senderText : "" showSender: pureMedia ? senderText : ""
showDate: pureMedia ? timeText : "" showDate: pureMedia ? timeText : ""
showLocalEcho: pureMedia ? readInfoText : "" showLocalEcho: pureMedia ? stateText : ""
transform: Translate { x: xOffset } transform: Translate { x: xOffset }

View File

@ -413,8 +413,9 @@ chat:
color ownBackground: colors.mediumBackground color ownBackground: colors.mediumBackground
color checkedBackground: colors.accentBackground color checkedBackground: colors.accentBackground
color body: colors.text color body: colors.text
color date: colors.dimText color date: colors.dimText
color serverState: colors.accentText
color redactedBody: colors.dimText color redactedBody: colors.dimText

View File

@ -422,8 +422,9 @@ chat:
color ownBackground: colors.mediumBackground color ownBackground: colors.mediumBackground
color checkedBackground: colors.accentBackground color checkedBackground: colors.accentBackground
color body: colors.text color body: colors.text
color date: colors.dimText color date: colors.dimText
color serverState: colors.accentText
color redactedBody: colors.dimText color redactedBody: colors.dimText