mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-23 04:59:26 +08:00
Replace SpinBox
with NumericTextFieldWithUnit
CURA-9146
This commit is contained in:
parent
4bb72cdd1a
commit
cb4f1a8ab5
@ -574,11 +574,11 @@ Item
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
Cura.SpinBox
|
Cura.NumericTextFieldWithUnit
|
||||||
{
|
{
|
||||||
id: spinBox
|
id: spinBox
|
||||||
anchors.left: label.right
|
anchors.left: label.right
|
||||||
value:
|
valueText:
|
||||||
{
|
{
|
||||||
// In case the setting is not in the material...
|
// In case the setting is not in the material...
|
||||||
if (!isNaN(parseFloat(materialPropertyProvider.properties.value)))
|
if (!isNaN(parseFloat(materialPropertyProvider.properties.value)))
|
||||||
@ -598,12 +598,11 @@ Item
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
width: settingsPage.columnWidth
|
width: settingsPage.columnWidth
|
||||||
suffix: " " + model.unit
|
maximum: 99999
|
||||||
to: 99999
|
unitText: model.unit
|
||||||
decimals: model.unit == "mm" ? 2 : 0
|
decimals: model.unit == "mm" ? 2 : 0
|
||||||
stepSize: Math.pow(10, -decimals)
|
|
||||||
|
|
||||||
onEditingFinished: materialPropertyProvider.setPropertyValue("value", value)
|
editingFinishedFunction: materialPropertyProvider.setPropertyValue("value", value)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.ContainerPropertyProvider
|
UM.ContainerPropertyProvider
|
||||||
|
Loading…
x
Reference in New Issue
Block a user