feat(StatusChatListCategoryItem): Add tooltips settings

Usage:

```qml
StatusChatListCategoryItem {
   addButton.tootlip.text: "Some add lazy text"
   menuButton.tooltip.text: "My menu"
}
```
This commit is contained in:
B.Melnik 2021-08-25 14:18:47 +03:00 committed by Pascal Precht
parent 7ef61ed3f8
commit f9775e4de3
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
4 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Core 0.1
StatusFlatRoundButton {
id: statusChatListCategoryItemButton
@ -9,7 +10,7 @@ StatusFlatRoundButton {
radius: 4
property bool highlighted: false
property alias tooltip: statusToolTip
property StatusTooltipSettings tooltip: StatusTooltipSettings {}
type: StatusFlatRoundButton.Type.Secondary
icon.width: 20
@ -22,6 +23,9 @@ StatusFlatRoundButton {
StatusToolTip {
id: statusToolTip
visible: !!text && parent.hovered
text: tooltip.text
orientation: tooltip.orientation
offset: tooltip.offset
}
}

View File

@ -0,0 +1,9 @@
import QtQuick 2.14
import StatusQ.Controls 0.1
QtObject {
property string text: ""
property int orientation: StatusToolTip.Orientation.Top
property int offset: 0
}

View File

@ -6,4 +6,4 @@ StatusIconSettings 0.1 StatusIconSettings.qml
StatusIconBackgroundSettings 0.1 StatusIconBackgroundSettings.qml
StatusImageSettings 0.1 StatusImageSettings.qml
StatusModalHeaderSettings 0.1 StatusModalHeaderSettings.qml
StatusTooltipSettings 0.1 StatusTooltipSettings.qml

View File

@ -257,5 +257,6 @@
<file>src/StatusQ/Components/StatusListItemBadge.qml</file>
<file>src/StatusQ/Popups/StatusSearchPopupMenuItem.qml</file>
<file>src/StatusQ/Popups/StatusSearchLocationMenu.qml</file>
<file>src/StatusQ/Core/StatusTooltipSettings.qml</file>
</qresource>
</RCC>