aboutsummaryrefslogtreecommitdiff
path: root/components/StandardButton.qml
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-06-01 01:37:47 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-06-01 01:37:47 -0500
commit1442215ce542ee8aafdba4862e3cb8886bda7f8d (patch)
tree8d222369f34e58018e7b8f325374f8a10b43b727 /components/StandardButton.qml
parentba3bdcd6a1b714e368c34f9fb72375d18e02ff68 (diff)
parent9d3864b7f09efc65d2f0e64f6579d5a3974721a2 (diff)
downloadmonzero-gui-1442215ce542ee8aafdba4862e3cb8886bda7f8d.tar.gz
monzero-gui-1442215ce542ee8aafdba4862e3cb8886bda7f8d.tar.xz
monzero-gui-1442215ce542ee8aafdba4862e3cb8886bda7f8d.zip
Merge pull request #3490
9d3864b Implement tooltips in multiple pages and components (rating89us)
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
}