aboutsummaryrefslogtreecommitdiff
path: root/components/StandardButton.qml
diff options
context:
space:
mode:
authorrating89us <45968869+rating89us@users.noreply.github.com>2021-05-19 18:36:44 +0200
committerrating89us <rating89us@rating89us.com>2021-05-29 04:02:19 +0200
commit9d3864b7f09efc65d2f0e64f6579d5a3974721a2 (patch)
treea4d0a39761280c3f6c744d61c433fb9ef3d08482 /components/StandardButton.qml
parent937cb9825672d07a1917d2d9daf823802ec31d1b (diff)
downloadmonzero-gui-9d3864b7f09efc65d2f0e64f6579d5a3974721a2.tar.gz
monzero-gui-9d3864b7f09efc65d2f0e64f6579d5a3974721a2.tar.xz
monzero-gui-9d3864b7f09efc65d2f0e64f6579d5a3974721a2.zip
Implement tooltips in multiple pages and components
Diffstat (limited to 'components/StandardButton.qml')
-rw-r--r--components/StandardButton.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index d26d9aa8..d77e611f 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -52,6 +52,9 @@ Item {
else return 16;
}
property alias label: label
+ property alias tooltip: tooltip.text
+ property alias tooltipLeft: tooltip.tooltipLeft
+ property alias tooltipPopup: tooltip.tooltipPopup
signal clicked()
height: small ? 30 : 36
@@ -161,11 +164,18 @@ Item {
}
}
+ MoneroComponents.Tooltip {
+ id: tooltip
+ anchors.fill: parent
+ }
+
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
onClicked: doClick()
+ onEntered: tooltip.text ? tooltip.tooltipPopup.open() : ""
+ onExited: tooltip.text ? tooltip.tooltipPopup.close() : ""
cursorShape: Qt.PointingHandCursor
}