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:
parent
378101fa31
commit
239fa5e20f
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue