From c5f19f12e52f55c63a91581702511da37c45e818 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 17 Jun 2023 21:24:24 +0200 Subject: [PATCH] Redesign timeline Remove border von bubbles and only hilight the bubble on hover (cherry picked from commit 7f459cb90ff3bab1f47c840b5608df6757fec626) --- src/qml/Component/Timeline/ReactionDelegate.qml | 8 ++++---- src/qml/Component/Timeline/TimelineContainer.qml | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/qml/Component/Timeline/ReactionDelegate.qml b/src/qml/Component/Timeline/ReactionDelegate.qml index 8d8d503bf..2908a7280 100644 --- a/src/qml/Component/Timeline/ReactionDelegate.qml +++ b/src/qml/Component/Timeline/ReactionDelegate.qml @@ -50,10 +50,10 @@ Flow { Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.View radius: height / 2 - shadow.size: Kirigami.Units.smallSpacing - shadow.color: !model.hasLocalUser ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10) - border.color: Kirigami.ColorUtils.tintWithAlpha(color, Kirigami.Theme.textColor, 0.15) - border.width: 1 + shadow { + size: Kirigami.Units.smallSpacing + color: !model.hasLocalUser ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10) + } } onClicked: reactionClicked(model.reaction) diff --git a/src/qml/Component/Timeline/TimelineContainer.qml b/src/qml/Component/Timeline/TimelineContainer.qml index 17f77219c..4396b0f54 100644 --- a/src/qml/Component/Timeline/TimelineContainer.qml +++ b/src/qml/Component/Timeline/TimelineContainer.qml @@ -526,21 +526,20 @@ ColumnLayout { return Kirigami.Theme.backgroundColor } radius: Kirigami.Units.smallSpacing - shadow.size: Kirigami.Units.smallSpacing - shadow.color: root.showHighlight ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10) - border.color: Kirigami.ColorUtils.tintWithAlpha(color, Kirigami.Theme.textColor, 0.15) - border.width: 1 + shadow { + size: Kirigami.Units.smallSpacing + color: root.isHighlighted ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10) + } Behavior on color { - enabled: isTemporaryHighlighted - ColorAnimation {target: bubbleBackground; duration: Kirigami.Units.veryLongDuration; easing.type: Easing.InOutCubic} + ColorAnimation { duration: Kirigami.Units.shortDuration } } } } } background: Rectangle { - visible: mainContainer.hovered + visible: mainContainer.hovered && Config.compactLayout color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15) radius: Kirigami.Units.smallSpacing }