|
18 | 18 | property bool isLE44 |
19 | 19 | property bool isLE46 |
20 | 20 | property bool isLE410 |
| 21 | + property bool isLE413 |
21 | 22 |
|
22 | 23 | Component.onCompleted: |
23 | 24 | { |
24 | 25 | is40 = (CuraSDKVersion == "6.0.0") |
25 | 26 | isLE44 = (CuraSDKVersion <= "7.0.0") |
26 | 27 | isLE46 = (CuraSDKVersion <= "7.2.0") |
27 | | - isLE410 = (CuraSDKVersion <= "7.6.0") && UM.Application.version != "master" |
| 28 | + isLE410 = (CuraSDKVersion <= "7.6.0") |
| 29 | + isLE413 = (CuraSDKVersion <= "7.9.0") && UM.Application.version != "master" |
28 | 30 |
|
29 | 31 | // adjust message stack position for sidebar |
30 | 32 | var messageStack |
|
36 | 38 | { |
37 | 39 | messageStack = base.contentItem.children[2].children[3].children[7] |
38 | 40 | } |
39 | | - else |
| 41 | + else if(isLE413) |
40 | 42 | { |
41 | 43 | messageStack = base.contentItem.children[2].children[3].children[8] |
42 | 44 | } |
| 45 | + else |
| 46 | + { |
| 47 | + messageStack = base.contentItem.children[3].children[3].children[8] |
| 48 | + } |
| 49 | + messageStack.anchors.horizontalCenter = undefined |
| 50 | + messageStack.anchors.left = messageStack.parent.left |
43 | 51 | messageStack.anchors.leftMargin = Qt.binding(function() |
44 | 52 | { |
45 | | - return Math.floor((base.width) / 2) |
| 53 | + return Math.floor((base.width - printSetupSelector.width) / 2) |
46 | 54 | }) |
47 | 55 |
|
48 | 56 | // adjust stages menu position for sidebar |
49 | 57 | var stagesListContainer = mainWindowHeader.children[1] |
| 58 | + stagesListContainer.anchors.horizontalCenter = undefined |
| 59 | + stagesListContainer.anchors.left = stagesListContainer.parent.left |
50 | 60 | stagesListContainer.anchors.leftMargin = Qt.binding(function() |
51 | 61 | { |
52 | 62 | return Math.floor((base.width - printSetupSelector.width - stagesListContainer.width) / 2) |
53 | 63 | }) |
54 | 64 |
|
55 | 65 | // hide application logo if there is no room for it |
56 | | - var applicationLogo = mainWindowHeader.children[0] // declared as property above |
| 66 | + var applicationLogo = mainWindowHeader.children[0] |
57 | 67 | applicationLogo.visible = Qt.binding(function() |
58 | 68 | { |
59 | 69 | return stagesListContainer.anchors.leftMargin > applicationLogo.width + 2 * UM.Theme.getSize("default_margin").width |
|
65 | 75 | id: machineSelection |
66 | 76 | headerCornerSide: Cura.RoundedRectangle.Direction.All |
67 | 77 | width: UM.Theme.getSize("machine_selector_widget").width |
68 | | - height: UM.Theme.getSize("main_window_header_button").height |
| 78 | + height: |
| 79 | + { |
| 80 | + if (isLE413) |
| 81 | + { |
| 82 | + return UM.Theme.getSize("main_window_header_button").height |
| 83 | + } else { |
| 84 | + return Math.round(0.5 * UM.Theme.getSize("main_window_header").height) |
| 85 | + } |
| 86 | + } |
69 | 87 | anchors.right: parent.right |
70 | 88 | anchors.rightMargin: UM.Theme.getSize("print_setup_widget").width - width |
71 | 89 | y: - Math.floor((UM.Theme.getSize("main_window_header").height + height) / 2) |
|
0 commit comments