From 21d7619a4541b122bc480630dad18e42cfa85e6d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 14 Nov 2018 16:57:05 +0100 Subject: [PATCH] Added a hover effect to the expandableComponent CURA-5785 --- resources/qml/ExpandableComponent.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index c098443cd7..d885253173 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -19,7 +19,8 @@ Item // The background color of the popup property color popupBackgroundColor: "white" - property alias headerBackgroundColor: background.color + property color headerBackgroundColor: "white" + property color headerHoverColor: "white" // How much spacing is needed around the popupItem property alias popupPadding: popup.padding @@ -63,7 +64,7 @@ Item id: background property real padding: UM.Theme.getSize("default_margin").width - color: "white" + color: headerBackgroundColor anchors.fill: parent Loader { @@ -97,8 +98,12 @@ Item MouseArea { + id: mouseArea anchors.fill: parent onClicked: popup.visible ? popup.close() : popup.open() + hoverEnabled: true + onEntered: background.color = headerHoverColor + onExited: background.color = headerBackgroundColor } }