Elide reaction button.
This commit is contained in:
@@ -12,9 +12,18 @@ Flow {
|
|||||||
model: reaction
|
model: reaction
|
||||||
|
|
||||||
delegate: Control {
|
delegate: Control {
|
||||||
|
width: Math.min(implicitWidth, 128)
|
||||||
|
|
||||||
horizontalPadding: 6
|
horizontalPadding: 6
|
||||||
verticalPadding: 0
|
verticalPadding: 0
|
||||||
|
|
||||||
|
contentItem: Label {
|
||||||
|
text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "")
|
||||||
|
color: MPalette.lighter
|
||||||
|
font.pixelSize: 14
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: modelData.hasLocalUser ? (MSettings.darkTheme ? Qt.darker(MPalette.accent, 1.55) : Qt.lighter(MPalette.accent, 1.55)) : MPalette.banner
|
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)
|
onClicked: currentRoom.toggleReaction(eventId, modelData.reaction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Label {
|
|
||||||
text: modelData.reaction + (modelData.count > 1 ? " " + modelData.count : "")
|
|
||||||
color: MPalette.lighter
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user