|
25 | 25 | width: childrenRect.width |
26 | 26 | height: childrenRect.height |
27 | 27 | UM.I18nCatalog { id: catalog; name: "cura"} |
28 | | - |
29 | | - Component.onCompleted: print(childrenRect) |
30 | 28 |
|
31 | 29 | property var s_size: UM.ActiveTool.properties.getValue("SSize") |
32 | 30 |
|
33 | 31 | function setSType(type) |
34 | 32 | { |
35 | 33 | // set checked state of mesh type buttons |
36 | | - cylinderButton.checked = type === 'cylinder'; |
37 | | - tubeButton.checked = type === 'tube'; |
38 | | - cubeButton.checked = type === 'cube'; |
39 | | - abutmentButton.checked = type === 'abutment'; |
40 | | - customButton.checked = type === 'custom'; |
41 | | - freeformButton.checked = type === 'freeform'; |
42 | | - UM.ActiveTool.setProperty("SType", type); |
| 34 | + cylinderButton.checked = type === 'cylinder' |
| 35 | + tubeButton.checked = type === 'tube' |
| 36 | + cubeButton.checked = type === 'cube' |
| 37 | + abutmentButton.checked = type === 'abutment' |
| 38 | + customButton.checked = type === 'custom' |
| 39 | + freeformButton.checked = type === 'freeform' |
| 40 | + UM.ActiveTool.setProperty("SType", type) |
43 | 41 | } |
44 | 42 |
|
45 | 43 | Column |
|
72 | 70 |
|
73 | 71 | UM.ToolbarButton |
74 | 72 | { |
75 | | - id: tubeButton; |
| 73 | + id: tubeButton |
76 | 74 | text: catalog.i18nc("@label", "Tube") |
77 | 75 | toolItem: UM.ColorImage |
78 | 76 | { |
|
88 | 86 |
|
89 | 87 | UM.ToolbarButton |
90 | 88 | { |
91 | | - id: cubeButton; |
| 89 | + id: cubeButton |
92 | 90 | text: catalog.i18nc("@label", "Cube") |
93 | 91 | toolItem: UM.ColorImage |
94 | 92 | { |
@@ -173,23 +171,23 @@ Item |
173 | 171 |
|
174 | 172 | Label |
175 | 173 | { |
176 | | - height: UM.Theme.getSize("setting_control").height; |
177 | | - text: catalog.i18nc("@label","Size"); |
178 | | - font: UM.Theme.getFont("default"); |
179 | | - color: UM.Theme.getColor("text"); |
180 | | - verticalAlignment: Text.AlignVCenter; |
| 174 | + height: UM.Theme.getSize("setting_control").height |
| 175 | + text: catalog.i18nc("@label","Size") |
| 176 | + font: UM.Theme.getFont("default") |
| 177 | + color: UM.Theme.getColor("text") |
| 178 | + verticalAlignment: Text.AlignVCenter |
181 | 179 | renderType: Text.NativeRendering |
182 | 180 | width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. |
183 | 181 | } |
184 | 182 |
|
185 | 183 | Label |
186 | 184 | { |
187 | | - height: UM.Theme.getSize("setting_control").height; |
188 | | - text: catalog.i18nc("@label","Max Size"); |
189 | | - font: UM.Theme.getFont("default"); |
190 | | - color: UM.Theme.getColor("text"); |
191 | | - verticalAlignment: Text.AlignVCenter; |
192 | | - visible: !freeformButton.checked; |
| 185 | + height: UM.Theme.getSize("setting_control").height |
| 186 | + text: catalog.i18nc("@label","Max Size") |
| 187 | + font: UM.Theme.getFont("default") |
| 188 | + color: UM.Theme.getColor("text") |
| 189 | + verticalAlignment: Text.AlignVCenter |
| 190 | + visible: !freeformButton.checked |
193 | 191 | renderType: Text.NativeRendering |
194 | 192 | width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. |
195 | 193 | } |
|
270 | 268 | onEditingFinished: |
271 | 269 | { |
272 | 270 | var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values |
273 | | - UM.ActiveTool.setProperty("MSize", modified_text); |
| 271 | + UM.ActiveTool.setProperty("MSize", modified_text) |
274 | 272 | } |
275 | 273 | } |
276 | 274 |
|
|
294 | 292 |
|
295 | 293 | onCurrentIndexChanged: |
296 | 294 | { |
297 | | - UM.ActiveTool.setProperty("SubType",cbItems.get(currentIndex).text); |
| 295 | + UM.ActiveTool.setProperty("SubType",cbItems.get(currentIndex).text) |
298 | 296 | } |
299 | 297 | } |
300 | 298 |
|
|
304 | 302 | width: UM.Theme.getSize("setting_control").width |
305 | 303 | height: UM.Theme.getSize("setting_control").height |
306 | 304 | unit: "mm" |
307 | | - visible: tubeButton.checked; |
| 305 | + visible: tubeButton.checked |
308 | 306 | text: UM.ActiveTool.properties.getValue("ISize") |
309 | 307 | validator: DoubleValidator |
310 | 308 | { |
|
331 | 329 | width: UM.Theme.getSize("setting_control").width |
332 | 330 | height: UM.Theme.getSize("setting_control").height |
333 | 331 | unit: "°" |
334 | | - // style: UM.Theme.styles.text_field |
335 | 332 | visible: !freeformButton.checked |
336 | 333 | text: UM.ActiveTool.properties.getValue("AAngle") |
337 | 334 | validator: IntValidator |
|
359 | 356 | UM.CheckBox |
360 | 357 | { |
361 | 358 | id: useYDirectionCheckbox |
362 | | - anchors.top: textfields.bottom |
363 | | - anchors.topMargin: UM.Theme.getSize("default_margin").height |
| 359 | + anchors.top: baseCheckBox.top |
| 360 | + // anchors.topMargin: UM.Theme.getSize("default_margin").height |
364 | 361 | anchors.left: parent.left |
365 | 362 | text: catalog.i18nc("@option:check","Set on Y direction") |
366 | 363 | visible: abutmentButton.checked || freeformButton.checked |
|
0 commit comments