Added highlight to ExpandableComponent

CURA-5785
This commit is contained in:
Jaime van Kessel 2018-11-15 14:04:52 +01:00
parent eca9820fc4
commit 3629e3b604

View file

@ -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