mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Added sections to the packagelists
By providing a `section_title` with a string to the `package_data` packages can be subdivided in sections, each with its own header. For remote packages this will be `None` and therefore no sections are created there. Contributes to CURA-8558
This commit is contained in:
parent
397baebda4
commit
c4c99f6657
3 changed files with 33 additions and 2 deletions
|
|
@ -24,6 +24,29 @@ ScrollView
|
|||
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
section.property: "package.sectionTitle"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: Rectangle
|
||||
{
|
||||
width: packagesListview.width
|
||||
height: sectionHeaderText.implicitHeight + UM.Theme.getSize("default_margin").height
|
||||
|
||||
color: UM.Theme.getColor("detail_background")
|
||||
|
||||
required property string section
|
||||
|
||||
Label
|
||||
{
|
||||
id: sectionHeaderText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
|
||||
text: parent.section
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
|
||||
delegate: Rectangle
|
||||
{
|
||||
width: packagesListview.width
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue