From 984133ba4aaed9128f72fe401d6fcd6635ad68f8 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 1 Feb 2021 16:29:35 -0500 Subject: [PATCH] feat: position emoji picker next to button group on the top --- .../Chat/ChatColumn/MessageComponents/ChatButtons.qml | 4 ++++ ui/app/AppLayouts/Chat/components/MessageContextMenu.qml | 1 + 2 files changed, 5 insertions(+) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatButtons.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatButtons.qml index 0351c9d6cb..624065c7b4 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatButtons.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatButtons.qml @@ -60,6 +60,10 @@ Rectangle { onClicked: { isMessageActive = true clickMessage(false, false, false, null, true) + messageContextMenu.x = buttonsContainer.x + buttonsContainer.width - messageContextMenu.width + + // The Math.max is to make sure that the menu is rendered + messageContextMenu.y -= Math.max(messageContextMenu.emojiContainer.height, 56) + Style.current.padding } onHoveredChanged: { buttonsContainer.hoverChanged(this.hovered) diff --git a/ui/app/AppLayouts/Chat/components/MessageContextMenu.qml b/ui/app/AppLayouts/Chat/components/MessageContextMenu.qml index b6e2dfa192..fd8e55b370 100644 --- a/ui/app/AppLayouts/Chat/components/MessageContextMenu.qml +++ b/ui/app/AppLayouts/Chat/components/MessageContextMenu.qml @@ -11,6 +11,7 @@ PopupMenu { property bool isProfile: false property bool isSticker: false property bool emojiOnly: false + property alias emojiContainer: emojiContainer id: messageContextMenu width: messageContextMenu.isProfile ? profileHeader.width : emojiContainer.width