@@ -34,37 +34,36 @@ Menu {
34
34
popup (showAt ? showAt : null );
35
35
}
36
36
37
- margins: 0
38
- bottomPadding: 1
39
- leftPadding: 1
40
- rightPadding: 1
37
+ margins: 2
38
+ bottomPadding: 0
39
+ leftPadding: 0
40
+ rightPadding: 0
41
+ topPadding: 0
41
42
modal: true
42
43
focus: true
43
44
closePolicy: Popup .CloseOnEscape | Popup .CloseOnPressOutside
44
45
width: stickersPerRow * stickerDimPad + 20
45
46
46
47
Rectangle {
47
48
color: Nheko .colors .window
48
- height: columnView .implicitHeight + 4
49
+ height: columnView .implicitHeight + Nheko . paddingSmall * 2
49
50
width: stickersPerRow * stickerDimPad + 20
50
51
51
52
ColumnLayout {
52
53
id: columnView
53
54
54
- spacing: 0
55
- anchors .leftMargin : 3
56
- anchors .rightMargin : 3
55
+ spacing: Nheko . paddingSmall
56
+ anchors .leftMargin : Nheko . paddingSmall
57
+ anchors .rightMargin : Nheko . paddingSmall
57
58
anchors .bottom : parent .bottom
58
59
anchors .left : parent .left
59
60
anchors .right : parent .right
60
- anchors .topMargin : 2
61
61
62
62
// Search field
63
63
TextField {
64
64
id: emojiSearch
65
65
66
- Layout .topMargin : 3
67
- Layout .preferredWidth : stickersPerRow * stickerDimPad + 20 - 6
66
+ Layout .preferredWidth : stickersPerRow * stickerDimPad + 20 - Nheko .paddingSmall
68
67
palette: Nheko .colors
69
68
background: null
70
69
placeholderTextColor: Nheko .colors .buttonText
@@ -87,37 +86,22 @@ Menu {
87
86
onTriggered: stickerPopup .model .searchString = emojiSearch .text
88
87
}
89
88
90
- ToolButton {
89
+ ImageButton {
91
90
id: clearSearch
92
91
93
92
visible: emojiSearch .text !== ' '
94
- icon .source : " image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearSearch .hovered ? Nheko .colors .highlight : Nheko .colors .buttonText )
93
+
94
+ image: " :/icons/icons/ui/round-remove-button.svg"
95
95
focusPolicy: Qt .NoFocus
96
96
onClicked: emojiSearch .clear ()
97
97
hoverEnabled: true
98
- background: null
99
-
100
98
anchors {
101
- verticalCenter: parent .verticalCenter
99
+ top: parent .top
100
+ bottom: parent .bottom
102
101
right: parent .right
102
+ rightMargin: Nheko .paddingSmall
103
103
}
104
- // clear the default hover effects.
105
-
106
- Image {
107
- height: parent .height - 2 * Nheko .paddingSmall
108
- width: height
109
- source: " image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearSearch .hovered ? Nheko .colors .highlight : Nheko .colors .buttonText )
110
-
111
- anchors {
112
- verticalCenter: parent .verticalCenter
113
- right: parent .right
114
- margins: Nheko .paddingSmall
115
- }
116
-
117
- }
118
-
119
104
}
120
-
121
105
}
122
106
123
107
// emoji grid
@@ -126,8 +110,7 @@ Menu {
126
110
127
111
model: roomid ? TimelineManager .completerFor (" stickers" , roomid) : null
128
112
Layout .preferredHeight : cellHeight * 3.5
129
- Layout .preferredWidth : stickersPerRow * stickerDimPad + 20
130
- Layout .leftMargin : 4
113
+ Layout .preferredWidth : stickersPerRow * stickerDimPad + 20 - Nheko .paddingSmall
131
114
cellWidth: stickerDimPad
132
115
cellHeight: stickerDimPad
133
116
boundsBehavior: Flickable .StopAtBounds
0 commit comments