ReactionComponent: visual changes to make it look consistent
This commit is contained in:
committed by
Joshua Goins
parent
5f20a86b62
commit
c2ae5afa73
@@ -52,6 +52,7 @@ Flow {
|
|||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: reactionDelegate.textContent
|
text: reactionDelegate.textContent
|
||||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||||
|
font.wordSpacing: Kirigami.Units.smallSpacing
|
||||||
background: null
|
background: null
|
||||||
wrapMode: TextEdit.NoWrap
|
wrapMode: TextEdit.NoWrap
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
@@ -59,19 +60,17 @@ Flow {
|
|||||||
|
|
||||||
padding: Kirigami.Units.smallSpacing
|
padding: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
background: Kirigami.ShadowedRectangle {
|
background: Rectangle {
|
||||||
Kirigami.Theme.inherit: false
|
color: reactionDelegate.hasLocalMember ? Qt.tint(Kirigami.Theme.backgroundColor, Qt.alpha(Kirigami.Theme.highlightColor, 0.4)) : Kirigami.Theme.backgroundColor
|
||||||
Kirigami.Theme.colorSet: NeoChatConfig.compactLayout ? Kirigami.Theme.View : Kirigami.Theme.Window
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: reactionDelegate.hasLocalMember ? Kirigami.Theme.positiveBackgroundColor : Kirigami.Theme.backgroundColor
|
border {
|
||||||
radius: height / 2
|
width: reactionDelegate.hovered ? 1 : 0
|
||||||
shadow {
|
color: Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
|
||||||
size: Kirigami.Units.smallSpacing
|
|
||||||
color: !reactionDelegate.hasLocalMember ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.Message.room.toggleReaction(root.eventId, reactionDelegate.reaction)
|
root.Message.room.toggleReaction(root.eventId, reactionDelegate.reaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -90,14 +89,14 @@ Flow {
|
|||||||
text: i18nc("@button", "React")
|
text: i18nc("@button", "React")
|
||||||
|
|
||||||
contentItem: Kirigami.Icon {
|
contentItem: Kirigami.Icon {
|
||||||
source: "list-add"
|
source: "smiley-add-symbolic"
|
||||||
}
|
}
|
||||||
|
|
||||||
padding: Kirigami.Units.smallSpacing
|
padding: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Kirigami.Theme.backgroundColor
|
color: Kirigami.Theme.backgroundColor
|
||||||
radius: height / 2
|
radius: Kirigami.Units.cornerRadius
|
||||||
border {
|
border {
|
||||||
width: reactButton.hovered ? 1 : 0
|
width: reactButton.hovered ? 1 : 0
|
||||||
color: Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
|
color: Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
|
||||||
|
|||||||
Reference in New Issue
Block a user