Skip to content

Commit 0c6a2fb

Browse files
committed
Fix white bar above sticker picker
1 parent c38c4b4 commit 0c6a2fb

File tree

2 files changed

+17
-35
lines changed

2 files changed

+17
-35
lines changed

resources/qml/emoji/EmojiPicker.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ Menu {
112112

113113
Layout.preferredHeight: cellHeight * 5
114114
Layout.preferredWidth: 7 * 52 + 20
115-
Layout.leftMargin: 0
116115
cellWidth: 52
117116
cellHeight: 52
118117
boundsBehavior: Flickable.StopAtBounds

resources/qml/emoji/StickerPicker.qml

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,36 @@ Menu {
3434
popup(showAt ? showAt : null);
3535
}
3636

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
4142
modal: true
4243
focus: true
4344
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
4445
width: stickersPerRow * stickerDimPad + 20
4546

4647
Rectangle {
4748
color: Nheko.colors.window
48-
height: columnView.implicitHeight + 4
49+
height: columnView.implicitHeight + Nheko.paddingSmall*2
4950
width: stickersPerRow * stickerDimPad + 20
5051

5152
ColumnLayout {
5253
id: columnView
5354

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
5758
anchors.bottom: parent.bottom
5859
anchors.left: parent.left
5960
anchors.right: parent.right
60-
anchors.topMargin: 2
6161

6262
// Search field
6363
TextField {
6464
id: emojiSearch
6565

66-
Layout.topMargin: 3
67-
Layout.preferredWidth: stickersPerRow * stickerDimPad + 20 - 6
66+
Layout.preferredWidth: stickersPerRow * stickerDimPad + 20 - Nheko.paddingSmall
6867
palette: Nheko.colors
6968
background: null
7069
placeholderTextColor: Nheko.colors.buttonText
@@ -87,37 +86,22 @@ Menu {
8786
onTriggered: stickerPopup.model.searchString = emojiSearch.text
8887
}
8988

90-
ToolButton {
89+
ImageButton {
9190
id: clearSearch
9291

9392
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"
9595
focusPolicy: Qt.NoFocus
9696
onClicked: emojiSearch.clear()
9797
hoverEnabled: true
98-
background: null
99-
10098
anchors {
101-
verticalCenter: parent.verticalCenter
99+
top: parent.top
100+
bottom: parent.bottom
102101
right: parent.right
102+
rightMargin: Nheko.paddingSmall
103103
}
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-
119104
}
120-
121105
}
122106

123107
// emoji grid
@@ -126,8 +110,7 @@ Menu {
126110

127111
model: roomid ? TimelineManager.completerFor("stickers", roomid) : null
128112
Layout.preferredHeight: cellHeight * 3.5
129-
Layout.preferredWidth: stickersPerRow * stickerDimPad + 20
130-
Layout.leftMargin: 4
113+
Layout.preferredWidth: stickersPerRow * stickerDimPad + 20 - Nheko.paddingSmall
131114
cellWidth: stickerDimPad
132115
cellHeight: stickerDimPad
133116
boundsBehavior: Flickable.StopAtBounds

0 commit comments

Comments
 (0)