diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2021-06-01 01:37:47 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2021-06-01 01:37:47 -0500 |
| commit | 1442215ce542ee8aafdba4862e3cb8886bda7f8d (patch) | |
| tree | 8d222369f34e58018e7b8f325374f8a10b43b727 /components/InlineButton.qml | |
| parent | ba3bdcd6a1b714e368c34f9fb72375d18e02ff68 (diff) | |
| parent | 9d3864b7f09efc65d2f0e64f6579d5a3974721a2 (diff) | |
| download | monzero-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/InlineButton.qml')
| -rw-r--r-- | components/InlineButton.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/InlineButton.qml b/components/InlineButton.qml index e493a67a..8e0d278b 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -46,6 +46,9 @@ Item { property alias fontStyleName: inlineText.font.styleName property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid property alias buttonColor: rect.color + property alias tooltip: tooltip.text + property alias tooltipLeft: tooltip.tooltipLeft + property alias tooltipBottom: tooltip.tooltipBottom height: isFontAwesomeIcon ? 30 : 24 width: isFontAwesomeIcon ? height : inlineText.width + 16 @@ -82,6 +85,11 @@ Item { } } + MoneroComponents.Tooltip { + id: tooltip + anchors.fill: parent + } + MouseArea { id: buttonArea cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor @@ -89,10 +97,12 @@ Item { anchors.fill: parent onClicked: doClick() onEntered: { + tooltip.text ? tooltip.tooltipPopup.open() : "" rect.color = buttonColor ? buttonColor : "#707070"; rect.opacity = 0.8; } onExited: { + tooltip.text ? tooltip.tooltipPopup.close() : "" rect.opacity = 1.0; rect.color = buttonColor ? buttonColor : "#808080"; } |
