From fa8fcd87861eb518fcc5061db19acb64cc9691dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Fri, 26 May 2023 09:33:41 -0400 Subject: [PATCH] callmessagedelegate: keep same text color as other message Even if the luma can change due to Qt.lighter, we should keep the same text color as we have for other messages. Change-Id: Ie1178b673043ee281b382150bb808878fc0aa75c GitLab: #1136 --- src/app/commoncomponents/CallMessageDelegate.qml | 7 ++++--- src/app/commoncomponents/SBSMessageBase.qml | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/commoncomponents/CallMessageDelegate.qml b/src/app/commoncomponents/CallMessageDelegate.qml index b7c66eff7..709eba8b0 100644 --- a/src/app/commoncomponents/CallMessageDelegate.qml +++ b/src/app/commoncomponents/CallMessageDelegate.qml @@ -55,12 +55,13 @@ SBSMessageBase { property bool isActive: LRCInstance.indexOfActiveCall(ConfId, ActionUri, DeviceId) !== -1 visible: isActive || ConfId === "" || Duration > 0 + property var baseColor: isOutgoing? CurrentConversation.color : JamiTheme.messageInBgColor bubble.color: { if (ConfId === "" && Duration === 0) { // If missed, we can add a darker pattern - return isOutgoing ? Qt.lighter(CurrentConversation.color, 1.15) : Qt.darker(JamiTheme.messageInBgColor, 1.15); + return Qt.lighter(root.baseColor, 1.15) } - return isOutgoing ? CurrentConversation.color : JamiTheme.messageInBgColor; + return root.baseColor } innerContent.children: [ @@ -89,7 +90,7 @@ SBSMessageBase { renderType: Text.NativeRendering textFormat: Text.MarkdownText - color: UtilsAdapter.luma(bubble.color) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark + color: UtilsAdapter.luma(root.baseColor) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark } JoinCallButton { diff --git a/src/app/commoncomponents/SBSMessageBase.qml b/src/app/commoncomponents/SBSMessageBase.qml index 2375a9a2b..8fc642c92 100644 --- a/src/app/commoncomponents/SBSMessageBase.qml +++ b/src/app/commoncomponents/SBSMessageBase.qml @@ -340,7 +340,6 @@ Control { type: seq isReply: root.isReply - function getBaseColor() { var baseColor = isOutgoing ? CurrentConversation.color : JamiTheme.messageInBgColor if (Id === MessagesAdapter.replyToId || Id === MessagesAdapter.editId) { -- GitLab