Improve sizing of emoji delegate
* Use Kirigami.Units.gridUnit * 2.5 for normal emoji * Use Kirigami.Units.gridUnit * 3 for custom emoji * Add small background padding to delegate * Add rounded hover effect Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
@@ -15,6 +15,10 @@ QQC2.ItemDelegate {
|
||||
QQC2.ToolTip.text: emojiDelegate.name
|
||||
QQC2.ToolTip.visible: hovered
|
||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||
leftInset: Kirigami.Units.smallSpacing
|
||||
topInset: Kirigami.Units.smallSpacing
|
||||
rightInset: Kirigami.Units.smallSpacing
|
||||
bottomInset: Kirigami.Units.smallSpacing
|
||||
|
||||
contentItem: Item {
|
||||
Kirigami.Heading {
|
||||
@@ -43,8 +47,10 @@ QQC2.ItemDelegate {
|
||||
|
||||
background: Rectangle {
|
||||
color: emojiDelegate.checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
|
||||
Rectangle {
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
anchors.fill: parent
|
||||
color: Kirigami.Theme.highlightColor
|
||||
opacity: emojiDelegate.hovered && !emojiDelegate.pressed ? 0.2 : 0
|
||||
|
||||
Reference in New Issue
Block a user