feat: position emoji picker next to button group on the top

This commit is contained in:
Jonathan Rainville 2021-02-01 16:29:35 -05:00 committed by Iuri Matias
parent 02651326b5
commit 984133ba4a
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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