aboutsummaryrefslogtreecommitdiff
path: root/components/IconButton.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/IconButton.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/IconButton.qml')
-rw-r--r--components/IconButton.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/IconButton.qml b/components/IconButton.qml
index 5d4d8d19..917c5d03 100644
--- a/components/IconButton.qml
+++ b/components/IconButton.qml
@@ -36,19 +36,28 @@ MoneroEffects.ImageMask {
color: MoneroComponents.Style.defaultFontColor
image: ""
+ property alias tooltip: tooltip.text
signal clicked(var mouse)
+ MoneroComponents.Tooltip {
+ id: tooltip
+ anchors.fill: parent
+ tooltipLeft: true
+ }
+
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
+ tooltip.text ? tooltip.tooltipPopup.open() : ""
button.width = button.width + 2
button.height = button.height + 2
}
onExited: {
+ tooltip.text ? tooltip.tooltipPopup.close() : ""
button.width = button.width - 2
button.height = button.height - 2
}