aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-03-14 01:19:08 +0000
committerxiphon <xiphon@protonmail.com>2020-03-14 01:19:08 +0000
commitd07da763833aa2542cfb4737d5f37b7f4733791c (patch)
tree26009b777391ad3ac204440e570d964d59071955
parent55b548f31cc87d36193a578b00d5a55e35e421f1 (diff)
downloadmonzero-gui-d07da763833aa2542cfb4737d5f37b7f4733791c.tar.gz
monzero-gui-d07da763833aa2542cfb4737d5f37b7f4733791c.tar.xz
monzero-gui-d07da763833aa2542cfb4737d5f37b7f4733791c.zip
MenuButton: add hover effect
-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