fix(StatusChatToolBar): Use updated StatusFlatRoundButton

Adapting the StatusChatToolBar with the new StatusFlatRoundButton and initializing it
This commit is contained in:
Khushboo Mehta 2021-08-12 16:31:49 +02:00 committed by Michał Cieślak
parent dc7ae4cce3
commit ca9f761251
1 changed files with 19 additions and 27 deletions

View File

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