mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
WIP: Make dropdown exclusive from each other
This commit is contained in:
parent
ffb8aed4c3
commit
28eaea8426
4 changed files with 230 additions and 7 deletions
|
|
@ -22,6 +22,14 @@ Item
|
|||
property alias title: header.title
|
||||
property alias contentShown: header.contentShown
|
||||
|
||||
signal clicked()
|
||||
|
||||
Connections
|
||||
{
|
||||
target: header
|
||||
onClicked: base.clicked()
|
||||
}
|
||||
|
||||
DropDownHeader
|
||||
{
|
||||
id: header
|
||||
|
|
@ -30,14 +38,15 @@ Item
|
|||
anchors.right: parent.right
|
||||
height: UM.Theme.getSize("expandable_component_content_header").height
|
||||
rightIconSource: contentShown ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right")
|
||||
|
||||
}
|
||||
|
||||
Cura.RoundedRectangle
|
||||
{
|
||||
id: contentRectangle
|
||||
anchors.top: header.bottom
|
||||
anchors.horizontalCenter: header.horizontalCenter
|
||||
width: header.width
|
||||
anchors.left: header.left
|
||||
anchors.right: header.right
|
||||
height: childrenRect.height
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
|
|
@ -53,7 +62,7 @@ Item
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: childrenRect.height
|
||||
height: childrenRect.height + 2
|
||||
anchors.margins: 1
|
||||
sourceComponent: base.contentComponent != null ? base.contentComponent : emptyComponent
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue