diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-19 23:19:04 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-20 00:57:52 +0200 |
commit | 58cfc39ac42633eafb65f17483533ef285b72c38 (patch) | |
tree | e44d1607d4056c33a139f17316c650c018ddacf1 /resources | |
parent | Prevent new packs from overwriting the default pack by accident (diff) | |
download | nheko-58cfc39ac42633eafb65f17483533ef285b72c38.tar.xz |
Fix StickerPicker padding and names of unnamed packs
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/emoji/StickerPicker.qml | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index f84fe06f..ce4d5200 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -138,6 +138,8 @@ Menu { section.delegate: sectionHeading section.labelPositioning: ViewSection.InlineLabels | ViewSection.CurrentLabelAtStart + spacing: Nheko.paddingSmall + ScrollHelper { flickable: parent anchors.fill: parent @@ -148,38 +150,40 @@ Menu { delegate: Row { required property var row; + spacing: Nheko.paddingSmall + Repeater { model: row - delegate: AbstractButton { - width: stickerDim - height: stickerDim - hoverEnabled: true - ToolTip.text: ":" + modelData.shortcode + ": - " + modelData.body - ToolTip.visible: hovered - // TODO: maybe add favorites at some point? - onClicked: { - console.debug("Picked " + modelData.descriptor); - stickerPopup.close(); - callback(modelData.descriptor); - } - - contentItem: Image { - height: stickerDim - width: stickerDim - source: modelData.url.replace("mxc://", "image://MxcImage/") + "?scale" - fillMode: Image.PreserveAspectFit + delegate: AbstractButton { + width: stickerDim + height: stickerDim + hoverEnabled: true + ToolTip.text: ":" + modelData.shortcode + ": - " + modelData.body + ToolTip.visible: hovered + // TODO: maybe add favorites at some point? + onClicked: { + console.debug("Picked " + modelData.descriptor); + stickerPopup.close(); + callback(modelData.descriptor); + } + + contentItem: Image { + height: stickerDim + width: stickerDim + source: modelData.url.replace("mxc://", "image://MxcImage/") + "?scale" + fillMode: Image.PreserveAspectFit + } + + background: Rectangle { + anchors.fill: parent + color: hovered ? Nheko.colors.highlight : 'transparent' + radius: 5 + } + + } } - - background: Rectangle { - anchors.fill: parent - color: hovered ? Nheko.colors.highlight : 'transparent' - radius: 5 - } - } - } - } ScrollBar.vertical: ScrollBar { id: emojiScroll |