1717 property bool isLE410
1818 property bool isLE413
1919 property bool isLE51
20+ property bool isLE52
2021
2122 property bool prepareStageActive: UM .Controller .activeStage .toString ().indexOf (" PrepareStage" ) == 0
2223 property bool preSlicedData: PrintInformation !== null && PrintInformation .preSliced
3435 isLE46 = (CuraSDKVersion <= " 7.2.0" )
3536 isLE410 = (CuraSDKVersion <= " 7.6.0" )
3637 isLE413 = (CuraSDKVersion <= " 7.9.0" )
37- isLE51 = (CuraSDKVersion <= " 8.1.0" ) && UM .Application .version != " master" && UM .Application .version != " dev"
38+ isLE51 = (CuraSDKVersion <= " 8.1.0" )
39+ isLE52 = (CuraSDKVersion <= " 8.2.0" ) && UM .Application .version != " master" && UM .Application .version != " dev"
3840 if (is40)
3941 {
4042 CuraApplication .log (" SidebarGUIPlugin patching interface for Cura 4.0" )
5961 {
6062 CuraApplication .log (" SidebarGUIPlugin patching interface for Cura 5.0 - 5.1" )
6163 }
62- else
64+ else if (isLE52)
6365 {
6466 CuraApplication .log (" SidebarGUIPlugin patching interface for Cura 5.2 and newer" )
6567 }
68+ else
69+ {
70+ CuraApplication .log (" SidebarGUIPlugin patching interface for Cura 5.3 and newer" )
71+ }
6672
6773 // top-align toolbar (defined in Cura.qml)
6874 toolbar .visible = true
8995 {
9096 messageStack = base .contentItem .children [2 ].children [3 ].children [8 ]
9197 }
92- else
98+ else if (isLE52)
9399 {
94100 messageStack = base .contentItem .children [3 ].children [3 ].children [8 ]
95101 }
102+ else
103+ {
104+ messageStack = base .contentItem .children [4 ].children [3 ].children [8 ]
105+ }
96106 messageStack .anchors .horizontalCenter = undefined
97107 messageStack .anchors .left = messageStack .parent .left
98108 messageStack .anchors .leftMargin = Qt .binding (function ()
@@ -159,6 +169,13 @@ Item
159169 customPrintSetup .children [0 ].height = 0
160170 customPrintSetup .children [2 ].anchors .rightMargin = 0
161171
172+ var recommendedPrintSetup = printSetupChildren .children [0 ]
173+ if (! isLE52)
174+ {
175+ recommendedPrintSetup .height = undefined
176+ recommendedPrintSetup .children [0 ].contentItem .children [0 ].children [9 ].children [0 ].visible = false
177+ }
178+
162179 // tweak header height
163180 headerBackground .height = mainWindowHeader .height + UM .Theme .getSize (" default_margin" ).height
164181 main .anchors .top = main .parent .top
@@ -208,10 +225,9 @@ Item
208225 }
209226 }
210227
211- Cura . MachineSelector
228+ Loader
212229 {
213- id: machineSelection
214- headerCornerSide: Cura .RoundedRectangle .Direction .All
230+ anchors .left : printSetupSidebar .left
215231 width: UM .Theme .getSize (" machine_selector_widget" ).width
216232 height:
217233 {
@@ -222,25 +238,15 @@ Item
222238 return Math .round (0.5 * UM .Theme .getSize (" main_window_header" ).height )
223239 }
224240 }
225- anchors .left : printSetupSidebar .left
226241 y: - Math .floor ((UM .Theme .getSize (" main_window_header" ).height + height) / 2 )
227242
228- Component . onCompleted :
243+ source :
229244 {
230- if (isLE410)
231- {
232- machineSelection .children [1 ].visible = false // remove shadow
233- }
234-
235- if (isLE46)
236- {
237- var machineSelectionHeader = machineSelection .children [0 ].children [3 ].children [0 ]
245+ if (isLE52) {
246+ return " MachineSelector40.qml" ;
238247 } else {
239- var machineSelectionHeader = machineSelection . children [ 0 ]. children [ 3 ]. children [ 1 ]
248+ return " MachineSelector53.qml " ;
240249 }
241- // adjust header margins, because the height is smaller than designed
242- machineSelectionHeader .anchors .topMargin = 0
243- machineSelectionHeader .anchors .bottomMargin = 0
244250 }
245251 }
246252
0 commit comments