diff --git a/src/StatusQ/Components/StatusChatToolBar.qml b/src/StatusQ/Components/StatusChatToolBar.qml index 44544d28..af8abb1e 100644 --- a/src/StatusQ/Components/StatusChatToolBar.qml +++ b/src/StatusQ/Components/StatusChatToolBar.qml @@ -56,12 +56,10 @@ Rectangle { type: StatusFlatRoundButton.Type.Secondary onClicked: statusChatToolBar.searchButtonClicked() - StatusToolTip { - visible: !!text && parent.hovered - text: "Search" - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - } + // initializing the tooltip + tooltip.text: "Search" + tooltip.orientation: StatusToolTip.Orientation.Bottom + tooltip.y: parent.height + 12 } StatusFlatRoundButton { @@ -72,12 +70,10 @@ Rectangle { type: StatusFlatRoundButton.Type.Secondary onClicked: statusChatToolBar.membersButtonClicked() - StatusToolTip { - visible: !!text && parent.hovered - text: "Members" - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - } + // initializing the tooltip + tooltip.text: "Members" + tooltip.orientation: StatusToolTip.Orientation.Bottom + tooltip.y: parent.height + 12 } StatusFlatRoundButton { @@ -88,6 +84,12 @@ Rectangle { type: StatusFlatRoundButton.Type.Secondary visible: !!statusChatToolBar.popupMenu + // initializing the tooltip + tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened + tooltip.text: "More" + tooltip.orientation: StatusToolTip.Orientation.Bottom + tooltip.y: parent.height + 12 + property bool showMoreMenu: false onClicked: { if (showMoreMenu) { @@ -101,13 +103,6 @@ Rectangle { showMoreMenu = !showMoreMenu; } - StatusToolTip { - visible: !!text && parent.hovered && !popupMenuSlot.item.opened - text: "More" - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - } - Loader { id: popupMenuSlot active: !!statusChatToolBar.popupMenu @@ -137,6 +132,11 @@ Rectangle { icon.height: 21 type: StatusFlatRoundButton.Type.Secondary + // initializing the tooltip + tooltip.text: "Activity" + tooltip.orientation: StatusToolTip.Orientation.Bottom + tooltip.y: parent.height + 12 + onClicked: statusChatToolBar.notificationButtonClicked() StatusBadge { @@ -160,14 +160,6 @@ Rectangle { border.width: 2 border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor } - - StatusToolTip { - visible: !!text && parent.hovered - text: "Activity" - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - arrow.x: width - (parent.width-4) - } } }