aboutsummaryrefslogtreecommitdiff
path: root/components/IconButton.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/IconButton.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/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
}