fix(StatusChatToolBar): ensure context menu as proper position

Also expose action buttons for more custom control.
This commit is contained in:
Pascal Precht 2021-06-08 16:44:13 +02:00 committed by Michał Cieślak
parent ce91db10fe
commit bd280acd83
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,8 @@ Rectangle {
color: Theme.palette.statusAppLayout.backgroundColor
property alias chatInfoButton: statusChatInfoButton
property alias menuButton: menuButton
property alias notificationButton: notificationButton
property int notificationCount: 0
property Component popupMenu
@ -35,6 +37,7 @@ Rectangle {
}
Row {
id: actionButtons
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
@ -52,7 +55,7 @@ Rectangle {
onClicked: {
statusChatToolBar.menuButtonClicked()
highlighted = true
popupMenuSlot.item.popup()
popupMenuSlot.item.popup(actionButtons.x + menuButton.width - popupMenuSlot.item.width, menuButton.height + 4)
}
}