Group printers by section (Connected Printers/Other Printers)

Cleanup redundant code.

CURA-9514
This commit is contained in:
joeydelarago 2022-08-23 15:44:16 +02:00
parent b18080c332
commit 93e2bef303
4 changed files with 35 additions and 49 deletions

View file

@ -67,7 +67,6 @@ Button
right: parent.right
top: buttonText.top
bottom: buttonText.bottom
verticalCenter: parent.verticalCenter
}
visible: model.machineType == "abstract_machine"

View file

@ -11,7 +11,7 @@ ListView
{
id: listView
model: Cura.MachineListModel {}
section.property: "section"
section.property: "isOnline"
property real contentHeight: childrenRect.height
ScrollBar.vertical: UM.ScrollBar
@ -21,7 +21,7 @@ ListView
section.delegate: UM.Label
{
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers")
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Other printers")
width: parent.width - scrollBar.width
height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("default_margin").width