Hover effects for inlineButton

pull/2/head
Sander Ferdinand 7 years ago committed by moneromooo-monero
parent bfd2a63aca
commit fb40d137f8

@ -42,11 +42,6 @@ Item {
property alias text: inlineText.text property alias text: inlineText.text
signal clicked() signal clicked()
anchors.top: parent.top
anchors.right: parent.right
anchors.rightMargin: 8
anchors.topMargin: 8
function doClick() { function doClick() {
// Android workaround // Android workaround
releaseFocus(); releaseFocus();
@ -76,9 +71,18 @@ Item {
MouseArea { MouseArea {
id: buttonArea id: buttonArea
cursorShape: Qt.PointingHandCursor cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
anchors.fill: parent anchors.fill: parent
onClicked: doClick() onClicked: doClick()
onEntered: {
rect.color = "#707070";
rect.opacity = 0.8;
}
onExited: {
rect.opacity = 1.0;
rect.color = "#808080";
}
} }
} }