From 71407345764a8ca876d2cb4b73bce3ac49150233 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 27 Nov 2020 12:42:06 +0100 Subject: [PATCH] Improve reaction delegate style --- .../Component/Timeline/ReactionDelegate.qml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/ReactionDelegate.qml b/imports/NeoChat/Component/Timeline/ReactionDelegate.qml index ac90139a1..6c9aaf382 100644 --- a/imports/NeoChat/Component/Timeline/ReactionDelegate.qml +++ b/imports/NeoChat/Component/Timeline/ReactionDelegate.qml @@ -17,14 +17,21 @@ Flow { Repeater { model: reaction - delegate: RoundButton { - width: Math.min(implicitWidth, Kirigami.Units.largeSpacing * 4) - implicitHeight: Kirigami.Units.largeSpacing * 4 + delegate: AbstractButton { + width: Math.max(implicitWidth, height) - horizontalPadding: 6 - verticalPadding: 0 + contentItem: Label { + horizontalAlignment: Text.AlignHCenter + text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "") + } - text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "") + padding: Kirigami.Units.smallSpacing + + background: Rectangle { + radius: height / 2 + Kirigami.Theme.colorSet: Kirigami.Theme.Button + color: checked ? Kirigami.Theme.positiveBackgroundColor : Kirigami.Theme.backgroundColor + } checkable: true