Browse Source

Added highlight to ExpandableComponent

CURA-5785
Jaime van Kessel 6 years ago
parent
commit
3629e3b604
1 changed files with 14 additions and 1 deletions
  1. 14 1
      resources/qml/ExpandableComponent.qml

+ 14 - 1
resources/qml/ExpandableComponent.qml

@@ -40,6 +40,8 @@ Item
     // Is the "drawer" open?
     readonly property alias expanded: popup.visible
 
+    property alias expandedHighlightColor: expandedHightlight.color
+
     function togglePopup()
     {
         if(popup.visible)
@@ -52,7 +54,6 @@ Item
         }
     }
 
-
     onPopupItemChanged:
     {
         // Since we want the size of the popup to be set by the size of the content,
@@ -79,6 +80,7 @@ Item
 
         color: headerBackgroundColor
         anchors.fill: parent
+
         Loader
         {
             id: headerItemLoader
@@ -92,6 +94,17 @@ Item
             }
         }
 
+        // A highlight that is shown when the popup is expanded
+        Rectangle
+        {
+            id: expandedHightlight
+            width: parent.width
+            height: UM.Theme.getSize("thick_lining").height
+            color: UM.Theme.getColor("primary")
+            visible: expanded
+            anchors.bottom: parent.bottom
+        }
+
         UM.RecolorImage
         {
             id: collapseButton