aboutsummaryrefslogtreecommitdiff
path: root/components/MenuButton.qml
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-03-27 10:55:07 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-03-27 10:55:07 -0500
commitaecd218d154d9dcccff9817f081b08e9b1b11a23 (patch)
tree385337664357f026afa3836dc495f7a0f0197e70 /components/MenuButton.qml
parent856843b52a0beede305da6048eac84b80778a27a (diff)
parentd07da763833aa2542cfb4737d5f37b7f4733791c (diff)
downloadmonzero-gui-aecd218d154d9dcccff9817f081b08e9b1b11a23.tar.gz
monzero-gui-aecd218d154d9dcccff9817f081b08e9b1b11a23.tar.xz
monzero-gui-aecd218d154d9dcccff9817f081b08e9b1b11a23.zip
Merge pull request #2807
d07da76 MenuButton: add hover effect (xiphon)
Diffstat (limited to 'components/MenuButton.qml')
-rw-r--r--components/MenuButton.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 01e31be8..cd57ea9e 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -62,7 +62,7 @@ Rectangle {
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
LinearGradient {
- visible: isOpenGL && button.checked
+ visible: isOpenGL && (button.checked || buttonArea.containsMouse)
height: parent.height
width: 260
anchors.verticalCenter: parent.verticalCenter
@@ -75,13 +75,15 @@ Rectangle {
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStart }
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStop }
}
+ opacity: button.checked ? 1 : 0.3
}
// fallback hover effect when opengl is not available
Rectangle {
- visible: !isOpenGL && button.checked
+ visible: !isOpenGL && (button.checked || buttonArea.containsMouse)
anchors.fill: parent
color: MoneroComponents.Style.menuButtonFallbackBackgroundColor
+ opacity: button.checked ? 1 : 0.3
}
// button decorations that are subject to leftMargin offsets