aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2017-12-06 14:11:06 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:01 +0100
commitfb40d137f87e569cc968911d97212b897b8294c9 (patch)
tree764b6e237889c5bad0a75fda9a1b54198a1ae29e
parentbfd2a63aca982465f3f7f473b580e6b440372fdc (diff)
downloadmonzero-gui-fb40d137f87e569cc968911d97212b897b8294c9.tar.gz
monzero-gui-fb40d137f87e569cc968911d97212b897b8294c9.tar.xz
monzero-gui-fb40d137f87e569cc968911d97212b897b8294c9.zip
Hover effects for inlineButton
-rw-r--r--components/InlineButton.qml16
1 files changed, 10 insertions, 6 deletions
diff --git a/components/InlineButton.qml b/components/InlineButton.qml
index 9e3f3c04..11439369 100644
--- a/components/InlineButton.qml
+++ b/components/InlineButton.qml
@@ -42,11 +42,6 @@ Item {
property alias text: inlineText.text
signal clicked()
- anchors.top: parent.top
- anchors.right: parent.right
- anchors.rightMargin: 8
- anchors.topMargin: 8
-
function doClick() {
// Android workaround
releaseFocus();
@@ -76,9 +71,18 @@ Item {
MouseArea {
id: buttonArea
- cursorShape: Qt.PointingHandCursor
+ cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
+ hoverEnabled: true
anchors.fill: parent
onClicked: doClick()
+ onEntered: {
+ rect.color = "#707070";
+ rect.opacity = 0.8;
+ }
+ onExited: {
+ rect.opacity = 1.0;
+ rect.color = "#808080";
+ }
}
}