Improve reaction delegate style
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user