diff --git a/src/StatusQ/Controls/StatusChatListCategoryItemButton.qml b/src/StatusQ/Controls/StatusChatListCategoryItemButton.qml index 6feee2cc..78472cb1 100644 --- a/src/StatusQ/Controls/StatusChatListCategoryItemButton.qml +++ b/src/StatusQ/Controls/StatusChatListCategoryItemButton.qml @@ -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 } } diff --git a/src/StatusQ/Core/StatusTooltipSettings.qml b/src/StatusQ/Core/StatusTooltipSettings.qml new file mode 100644 index 00000000..88bcfdb5 --- /dev/null +++ b/src/StatusQ/Core/StatusTooltipSettings.qml @@ -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 +} diff --git a/src/StatusQ/Core/qmldir b/src/StatusQ/Core/qmldir index a1c36847..2991517d 100644 --- a/src/StatusQ/Core/qmldir +++ b/src/StatusQ/Core/qmldir @@ -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 diff --git a/statusq.qrc b/statusq.qrc index 0bee76cc..abcaec77 100644 --- a/statusq.qrc +++ b/statusq.qrc @@ -257,5 +257,6 @@ src/StatusQ/Components/StatusListItemBadge.qml src/StatusQ/Popups/StatusSearchPopupMenuItem.qml src/StatusQ/Popups/StatusSearchLocationMenu.qml + src/StatusQ/Core/StatusTooltipSettings.qml