Skip to content

Commit bf0355e

Browse files
committed
Update CustomSupport.qml
1 parent c839e8b commit bf0355e

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

qml_qt6/CustomSupport.qml

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,19 @@ Item
2525
width: childrenRect.width
2626
height: childrenRect.height
2727
UM.I18nCatalog { id: catalog; name: "cura"}
28-
29-
Component.onCompleted: print(childrenRect)
3028

3129
property var s_size: UM.ActiveTool.properties.getValue("SSize")
3230

3331
function setSType(type)
3432
{
3533
// 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)
4341
}
4442

4543
Column
@@ -72,7 +70,7 @@ Item
7270

7371
UM.ToolbarButton
7472
{
75-
id: tubeButton;
73+
id: tubeButton
7674
text: catalog.i18nc("@label", "Tube")
7775
toolItem: UM.ColorImage
7876
{
@@ -88,7 +86,7 @@ Item
8886

8987
UM.ToolbarButton
9088
{
91-
id: cubeButton;
89+
id: cubeButton
9290
text: catalog.i18nc("@label", "Cube")
9391
toolItem: UM.ColorImage
9492
{
@@ -173,23 +171,23 @@ Item
173171

174172
Label
175173
{
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
181179
renderType: Text.NativeRendering
182180
width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width.
183181
}
184182

185183
Label
186184
{
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
193191
renderType: Text.NativeRendering
194192
width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width.
195193
}
@@ -270,7 +268,7 @@ Item
270268
onEditingFinished:
271269
{
272270
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)
274272
}
275273
}
276274

@@ -294,7 +292,7 @@ Item
294292

295293
onCurrentIndexChanged:
296294
{
297-
UM.ActiveTool.setProperty("SubType",cbItems.get(currentIndex).text);
295+
UM.ActiveTool.setProperty("SubType",cbItems.get(currentIndex).text)
298296
}
299297
}
300298

@@ -304,7 +302,7 @@ Item
304302
width: UM.Theme.getSize("setting_control").width
305303
height: UM.Theme.getSize("setting_control").height
306304
unit: "mm"
307-
visible: tubeButton.checked;
305+
visible: tubeButton.checked
308306
text: UM.ActiveTool.properties.getValue("ISize")
309307
validator: DoubleValidator
310308
{
@@ -331,7 +329,6 @@ Item
331329
width: UM.Theme.getSize("setting_control").width
332330
height: UM.Theme.getSize("setting_control").height
333331
unit: "°"
334-
// style: UM.Theme.styles.text_field
335332
visible: !freeformButton.checked
336333
text: UM.ActiveTool.properties.getValue("AAngle")
337334
validator: IntValidator
@@ -359,8 +356,8 @@ Item
359356
UM.CheckBox
360357
{
361358
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
364361
anchors.left: parent.left
365362
text: catalog.i18nc("@option:check","Set on Y direction")
366363
visible: abutmentButton.checked || freeformButton.checked

0 commit comments

Comments
 (0)