Elide reaction button.

This commit is contained in:
Black Hat
2019-10-06 19:10:31 -07:00
parent 21626342f3
commit 752f262a55

View File

@@ -12,9 +12,18 @@ Flow {
model: reaction
delegate: Control {
width: Math.min(implicitWidth, 128)
horizontalPadding: 6
verticalPadding: 0
contentItem: Label {
text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "")
color: MPalette.lighter
font.pixelSize: 14
elide: Text.ElideRight
}
background: Rectangle {
radius: height / 2
color: modelData.hasLocalUser ? (MSettings.darkTheme ? Qt.darker(MPalette.accent, 1.55) : Qt.lighter(MPalette.accent, 1.55)) : MPalette.banner
@@ -46,12 +55,6 @@ Flow {
onClicked: currentRoom.toggleReaction(eventId, modelData.reaction)
}
}
contentItem: Label {
text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "")
color: MPalette.lighter
font.pixelSize: 14
}
}
}
}