From c03bf32a7b42ebbe6f8d387e4273c83890b73ff7 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 27 Mar 2020 05:09:49 -0400 Subject: [PATCH] Theme color for eventList highlight --- TODO.md | 1 - src/gui/Pages/Chat/Timeline/EventList.qml | 5 +++++ src/themes/Glass.qpl | 3 +++ src/themes/Midnight.qpl | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 7238615e..88bcee26 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO -- focus color - Long-press-drag to select multiple messages on touch - Drag to select multiple messages on non-touch diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index ea293bf6..499c58a1 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -76,6 +76,11 @@ Rectangle { model: ModelStore.get(chat.userId, chat.roomId, "events") delegate: EventDelegate {} + highlight: Rectangle { + color: theme.chat.message.focusedHighlight + opacity: theme.chat.message.focusedHighlightOpacity + } + // Since the list is BottomToTop, this is actually a header footer: Item { width: eventList.width diff --git a/src/themes/Glass.qpl b/src/themes/Glass.qpl index 5aceb69b..b4de7ccc 100644 --- a/src/themes/Glass.qpl +++ b/src/themes/Glass.qpl @@ -343,6 +343,9 @@ chat: int horizontalSpacing: theme.spacing / 1.25 int verticalSpacing: theme.spacing / 1.75 + color focusedHighlight: colors.accentBackground + real focusedHighlightOpacity: 0.4 + color background: colors.mediumBackground color ownBackground: colors.strongBackground color checkedBackground: colors.accentBackground diff --git a/src/themes/Midnight.qpl b/src/themes/Midnight.qpl index 41fe014c..2c8dd7ab 100644 --- a/src/themes/Midnight.qpl +++ b/src/themes/Midnight.qpl @@ -356,6 +356,9 @@ chat: int horizontalSpacing: theme.spacing / 1.25 int verticalSpacing: theme.spacing / 1.75 + color focusedHighlight: colors.accentBackground + real focusedHighlightOpacity: 0.4 + color background: colors.weakBackground color ownBackground: colors.mediumBackground color checkedBackground: colors.accentBackground