feat(StatusChatToolBar): add tooltips to action buttons

Closes #244
This commit is contained in:
Pascal Precht 2021-07-09 14:13:24 +02:00
parent e93dab2ba0
commit 86da901e88
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 28 additions and 0 deletions

View File

@ -55,6 +55,13 @@ Rectangle {
icon.name: "search" icon.name: "search"
type: StatusFlatRoundButton.Type.Secondary type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.searchButtonClicked() onClicked: statusChatToolBar.searchButtonClicked()
StatusToolTip {
visible: !!text && parent.hovered
text: "Search"
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
} }
StatusFlatRoundButton { StatusFlatRoundButton {
@ -64,6 +71,13 @@ Rectangle {
icon.name: "group-chat" icon.name: "group-chat"
type: StatusFlatRoundButton.Type.Secondary type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.membersButtonClicked() onClicked: statusChatToolBar.membersButtonClicked()
StatusToolTip {
visible: !!text && parent.hovered
text: "Members"
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
} }
StatusFlatRoundButton { StatusFlatRoundButton {
@ -80,6 +94,13 @@ Rectangle {
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4) popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
} }
StatusToolTip {
visible: !!text && parent.hovered && !popupMenuSlot.item.opened
text: "More"
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
Loader { Loader {
id: popupMenuSlot id: popupMenuSlot
active: !!statusChatToolBar.popupMenu active: !!statusChatToolBar.popupMenu
@ -132,6 +153,13 @@ Rectangle {
border.width: 2 border.width: 2
border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor 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
}
} }
} }