mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Simplify sectionHeading element
No need to define that component in a higher location, just define it where you need it. Also, no need to use a Rectangle for this if it has no colour, just use an Item, but the Item itself is also not necessary if you just need the padding. Contributes to issue CURA-5876.
This commit is contained in:
parent
3b219e3ac3
commit
a03e1be601
1 changed files with 7 additions and 16 deletions
|
@ -25,21 +25,6 @@ Column
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component
|
|
||||||
{
|
|
||||||
id: sectionHeading
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: section
|
|
||||||
font: UM.Theme.getFont("default_bold")
|
|
||||||
color: UM.Theme.getColor("configuration_item_text")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
id: container
|
id: container
|
||||||
|
@ -58,7 +43,13 @@ Column
|
||||||
|
|
||||||
section.property: "modelData.printerType"
|
section.property: "modelData.printerType"
|
||||||
section.criteria: ViewSection.FullString
|
section.criteria: ViewSection.FullString
|
||||||
section.delegate: sectionHeading
|
section.delegate: Label
|
||||||
|
{
|
||||||
|
text: section
|
||||||
|
font: UM.Theme.getFont("default_bold")
|
||||||
|
color: UM.Theme.getColor("configuration_item_text")
|
||||||
|
bottomPadding: UM.Theme.getSize("default_margin").height
|
||||||
|
}
|
||||||
|
|
||||||
model: (outputDevice != null) ? outputDevice.uniqueConfigurations : []
|
model: (outputDevice != null) ? outputDevice.uniqueConfigurations : []
|
||||||
delegate: ConfigurationItem
|
delegate: ConfigurationItem
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue