mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 16:09:01 +08:00
Show settings in profile as a sorted list with section headers
CURA-1585
This commit is contained in:
parent
bbc33f5d70
commit
ce388c4b23
@ -91,20 +91,14 @@ UM.ManagementPage
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Row {
|
||||
id: currentSettingsActions
|
||||
visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: profileName.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Column
|
||||
{
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Row
|
||||
{
|
||||
visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId
|
||||
Button
|
||||
{
|
||||
text: {
|
||||
@ -124,37 +118,36 @@ UM.ManagementPage
|
||||
}
|
||||
}
|
||||
|
||||
Grid
|
||||
{
|
||||
id: containerGrid
|
||||
columns: 2
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: currentSettingsActions.visible ? currentSettingsActions.bottom : profileName.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
ListView {
|
||||
model: base.currentItem ? base.currentItem.settings: null
|
||||
delegate: Row {
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label {
|
||||
text: base.currentItem == null ? "" :
|
||||
base.currentItem.id == -1 ? catalog.i18nc("@label", "Based on") : catalog.i18nc("@label", "Profile type")
|
||||
text: model.label
|
||||
elide: Text.ElideMiddle
|
||||
width: scrollView.width / 100 * 40
|
||||
}
|
||||
Label {
|
||||
text: base.currentItem == null ? "" :
|
||||
base.currentItem.id == -1 ? Cura.MachineManager.activeQualityName:
|
||||
base.currentItem.metadata.read_only ? catalog.i18nc("@label", "Protected profile") : catalog.i18nc("@label", "Custom profile")
|
||||
text: model.value.toString()
|
||||
}
|
||||
|
||||
Column {
|
||||
Repeater {
|
||||
model: base.currentItem ? base.currentItem.settings : null
|
||||
Label {
|
||||
text: modelData.label
|
||||
elide: Text.ElideMiddle;
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
Repeater {
|
||||
model: base.currentItem ? base.currentItem.settings : null
|
||||
Label { text: modelData.value.toString(); }
|
||||
text: model.unit
|
||||
}
|
||||
}
|
||||
section.property: "category"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: Label {
|
||||
text: section
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user