Skip to content

Commit 5ddd2e9

Browse files
committed
Optimise "50" versions of qml components
Fixes for older versions of Cura are no longer applicable here.
1 parent 091e168 commit 5ddd2e9

4 files changed

Lines changed: 7 additions & 46 deletions

File tree

resources/qml/ExtruderTabs50.qml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,8 @@ TabRow
1212
id: tabBar
1313

1414
property var extrudersModel: CuraApplication.getExtrudersModel()
15-
property bool hasMaterials:
16-
{
17-
if (CuraSDKVersion >= "6.2.0") {
18-
return (Cura.MachineManager.activeMachine != null) ? Cura.MachineManager.activeMachine.hasMaterials : false
19-
} else {
20-
return Cura.MachineManager.hasMaterials
21-
}
22-
}
23-
property bool hasVariants:
24-
{
25-
if (CuraSDKVersion >= "6.2.0") {
26-
return (Cura.MachineManager.activeMachine != null) ? Cura.MachineManager.activeMachine.hasVariants : false
27-
} else {
28-
return Cura.MachineManager.hasVariants
29-
}
30-
}
31-
15+
property bool hasMaterials: (Cura.MachineManager.activeMachine != null) ? Cura.MachineManager.activeMachine.hasMaterials : false
16+
property bool hasVariants: (Cura.MachineManager.activeMachine != null) ? Cura.MachineManager.activeMachine.hasVariants : false
3217
visible: hasMaterials || hasVariants
3318
width: parent.width
3419
height: UM.Theme.getSize("extruder_icon").height + UM.Theme.getSize("narrow_margin").height

resources/qml/ProfileSelector50.qml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,7 @@ Item
135135
anchors.rightMargin: UM.Theme.getSize("default_margin").width
136136

137137
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
138-
iconSource:
139-
{
140-
if(isLE410)
141-
{
142-
UM.Theme.getIcon("star")
143-
}
144-
return UM.Theme.getIcon("StarFilled")
145-
}
138+
iconSource: UM.Theme.getIcon("StarFilled")
146139

147140
onClicked:
148141
{

resources/qml/ViewOptionsPanel40.qml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,7 @@ Rectangle
144144
{
145145
return UM.Controller.activeView.stageMenuComponent;
146146
}
147-
if (isLE413)
148-
{
149-
return "PrepareStageLegend40.qml";
150-
}
151-
else
152-
{
153-
return "PrepareStageLegend50.qml";
154-
}
147+
return "PrepareStageLegend40.qml";
155148
}
156149

157150
onLoaded:

resources/qml/ViewOptionsPanel50.qml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,9 @@ Rectangle
6666
{
6767
Component.onCompleted:
6868
{
69-
if(!isLE410)
69+
for(var child_nr in children)
7070
{
71-
for(var child_nr in children)
72-
{
73-
children[child_nr].iconMargin = 3 * UM.Theme.getSize("default_lining").width
74-
}
71+
children[child_nr].iconMargin = 3 * UM.Theme.getSize("default_lining").width
7572
}
7673
}
7774
}
@@ -144,14 +141,7 @@ Rectangle
144141
{
145142
return UM.Controller.activeView.stageMenuComponent;
146143
}
147-
if (isLE413)
148-
{
149-
return "PrepareStageLegend40.qml";
150-
}
151-
else
152-
{
153-
return "PrepareStageLegend50.qml";
154-
}
144+
return "PrepareStageLegend50.qml";
155145
}
156146

157147
onLoaded:

0 commit comments

Comments
 (0)