Fix emoji picker

This commit is contained in:
q234rty 2022-06-30 11:39:19 +08:00
parent bda88a0379
commit fd87dc615c
No known key found for this signature in database
GPG key ID: D7E83C63C8CC4545

View file

@ -257,6 +257,10 @@ Menu {
Layout.preferredWidth: 36 Layout.preferredWidth: 36
Layout.preferredHeight: 36 Layout.preferredHeight: 36
hoverEnabled: true hoverEnabled: true
leftPadding: 2
rightPadding: 2
topPadding: 2
bottomPadding: 2
ToolTip.text: { ToolTip.text: {
switch (model.category) { switch (model.category) {
case Emoji.Category.People: case Emoji.Category.People:
@ -294,13 +298,10 @@ Menu {
contentItem: Image { contentItem: Image {
horizontalAlignment: Image.AlignHCenter horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter verticalAlignment: Image.AlignVCenter
fillMode: Image.Pad
height: 32
width: 32
smooth: true smooth: true
mipmap: true mipmap: true
sourceSize.width: 32 * Screen.devicePixelRatio sourceSize.width: width
sourceSize.height: 32 * Screen.devicePixelRatio sourceSize.height: height
source: "image://colorimage/" + model.image + "?" + (hovered ? Nheko.colors.highlight : Nheko.colors.buttonText) source: "image://colorimage/" + model.image + "?" + (hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
} }