From f8392b8e45aee8fe8c08c13b672ea80b081ccf64 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Tue, 30 Mar 2021 18:26:42 -0400 Subject: [PATCH] Add mobile-friendly emoji picker mode This also fixes some wacky indentations. --- resources/qml/emoji/EmojiPicker.qml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/qml/emoji/EmojiPicker.qml b/resources/qml/emoji/EmojiPicker.qml index e83f8a5e..312beb52 100644 --- a/resources/qml/emoji/EmojiPicker.qml +++ b/resources/qml/emoji/EmojiPicker.qml @@ -25,7 +25,10 @@ Menu { function show(showAt, callback) { console.debug("Showing emojiPicker"); emojiPopup.callback = callback; - popup(showAt ? showAt : null); + if (Settings.mobileMode) + popup(0, timelineRoot.height - height, null); + else + popup(showAt ? showAt : null); } margins: 0 @@ -35,9 +38,10 @@ Menu { modal: true focus: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside - //height: columnView.implicitHeight + 4 - //width: columnView.implicitWidth - width: 7 * 52 + 20 + + width: Settings.mobileMode ? timelineRoot.width : 7 * 52 + 20 + x: Settings.mobileMode ? 0 : undefined + y: Settings.mobileMode ? timelineRoot.height - height : undefined Rectangle { color: Nheko.colors.window @@ -125,6 +129,7 @@ Menu { Layout.preferredHeight: cellHeight * 5 Layout.preferredWidth: 7 * 52 + 20 + Layout.fillWidth: true Layout.leftMargin: 4 cellWidth: 52 cellHeight: 52