Improve reaction delegate style

This commit is contained in:
Carl Schwan
2020-11-27 12:42:06 +01:00
parent feebc7678a
commit 7140734576

View File

@@ -17,14 +17,21 @@ Flow {
Repeater { Repeater {
model: reaction model: reaction
delegate: RoundButton { delegate: AbstractButton {
width: Math.min(implicitWidth, Kirigami.Units.largeSpacing * 4) width: Math.max(implicitWidth, height)
implicitHeight: Kirigami.Units.largeSpacing * 4
horizontalPadding: 6 contentItem: Label {
verticalPadding: 0 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 checkable: true