mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Clean up section property logic
CURA-9424
This commit is contained in:
parent
79a7b1e064
commit
06a2886139
2 changed files with 33 additions and 20 deletions
|
@ -10,7 +10,7 @@ import Cura 1.0 as Cura
|
|||
ListView
|
||||
{
|
||||
id: listView
|
||||
section.property: "isOnline"
|
||||
section.property: "category"
|
||||
property real contentHeight: childrenRect.height
|
||||
property var onSelectPrinter
|
||||
|
||||
|
@ -21,7 +21,15 @@ ListView
|
|||
|
||||
section.delegate: UM.Label
|
||||
{
|
||||
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Other printers")
|
||||
text: {
|
||||
switch (section)
|
||||
{
|
||||
case "connected":
|
||||
return catalog.i18nc("@label", "Connected printers");
|
||||
case "other":
|
||||
return catalog.i18nc("@label", "Other printers");
|
||||
}
|
||||
}
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
width: parent.width - scrollBar.width
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue