From 5ce30d6019d1dacf9dd60a1ce50672784aaef635 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 15 Sep 2020 14:55:03 -0400 Subject: [PATCH] Add message echo/read counter color theme property --- src/gui/Pages/Chat/Timeline/EventContent.qml | 8 ++++---- src/themes/Glass.qpl | 5 +++-- src/themes/Midnight.qpl | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gui/Pages/Chat/Timeline/EventContent.qml b/src/gui/Pages/Chat/Timeline/EventContent.qml index 2867118e..28ab4c20 100644 --- a/src/gui/Pages/Chat/Timeline/EventContent.qml +++ b/src/gui/Pages/Chat/Timeline/EventContent.qml @@ -35,9 +35,9 @@ HRowLayout { property string contentText: utils.processedEventText(model) readonly property string timeText: utils.formatTime(model.date, false) - readonly property string readInfoText: + readonly property string stateText: `` + ( + `color=${theme.chat.message.serverState}>` + ( model.is_local_echo ? ` ⏳` : model.read_by_count ? ` ⦿ ${model.read_by_count}` : "" @@ -170,7 +170,7 @@ HRowLayout { timeText + "" + - readInfoText + stateText transform: Translate { x: xOffset } @@ -317,7 +317,7 @@ HRowLayout { mediaUrl: modelData showSender: pureMedia ? senderText : "" showDate: pureMedia ? timeText : "" - showLocalEcho: pureMedia ? readInfoText : "" + showLocalEcho: pureMedia ? stateText : "" transform: Translate { x: xOffset } diff --git a/src/themes/Glass.qpl b/src/themes/Glass.qpl index 6c04bf42..b2f37236 100644 --- a/src/themes/Glass.qpl +++ b/src/themes/Glass.qpl @@ -413,8 +413,9 @@ chat: color ownBackground: colors.mediumBackground color checkedBackground: colors.accentBackground - color body: colors.text - color date: colors.dimText + color body: colors.text + color date: colors.dimText + color serverState: colors.accentText color redactedBody: colors.dimText diff --git a/src/themes/Midnight.qpl b/src/themes/Midnight.qpl index 795aab99..95215cf6 100644 --- a/src/themes/Midnight.qpl +++ b/src/themes/Midnight.qpl @@ -422,8 +422,9 @@ chat: color ownBackground: colors.mediumBackground color checkedBackground: colors.accentBackground - color body: colors.text - color date: colors.dimText + color body: colors.text + color date: colors.dimText + color serverState: colors.accentText color redactedBody: colors.dimText