Add mobile-friendly emoji picker mode

This also fixes some wacky indentations.
This commit is contained in:
Loren Burkholder 2021-03-30 18:26:42 -04:00
parent bef2216ad3
commit f8392b8e45

View file

@ -25,6 +25,9 @@ Menu {
function show(showAt, callback) {
console.debug("Showing emojiPicker");
emojiPopup.callback = callback;
if (Settings.mobileMode)
popup(0, timelineRoot.height - height, null);
else
popup(showAt ? showAt : null);
}
@ -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