From 4783ce8c4414e775d74bb34da5989dd9574439d4 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 30 Mar 2022 01:23:23 +0200 Subject: [PATCH] Add a background to scroll to bottom button --- resources/qml/MessageView.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index 541677a7..ab0c9b1e 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -768,7 +768,15 @@ Item { radius: width/2 onClicked: chat.positionViewAtBeginning(); flat: true - highlighted: true + hoverEnabled: true + + background: Rectangle { + color: toEndButton.down ? Nheko.colors.highlight : Nheko.colors.button + opacity: enabled ? 1 : 0.3 + border.color: toEndButton.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText + border.width: 1 + radius: toEndButton.radius + } states: State { name: "hidden" @@ -779,7 +787,7 @@ Item { id: buttonImg anchors.fill: parent anchors.margins: Nheko.paddingMedium - source: ("image://colorimage/" + ":/icons/icons/ui/download.svg" + "?" + Nheko.colors.buttonText) + source: "image://colorimage/:/icons/icons/ui/download.svg?" + (toEndButton.down ? Nheko.colors.highlightedText : Nheko.colors.buttonText) fillMode: Image.PreserveAspectFit }