Fix spinbox height being almost 0 and padding being missing between buttons and text input.

CURA-8640
This commit is contained in:
j.delarago 2022-04-04 09:25:22 +02:00
parent 0f84fc3abe
commit e20ded248f

View File

@ -34,8 +34,7 @@ Item
} }
signal editingFinished() signal editingFinished()
implicitWidth: spinBox.implicitWidth height: UM.Theme.getSize("setting_control").height
implicitHeight: spinBox.implicitHeight
SpinBox SpinBox
{ {
@ -44,8 +43,8 @@ Item
editable: base.editable editable: base.editable
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
padding: UM.Theme.getSize("narrow_margin").width leftPadding: down.indicator.width + UM.Theme.getSize("narrow_margin").width
rightPadding: up.indicator.width + UM.Theme.getSize("narrow_margin").width
// The stepSize of the SpinBox is intentionally set to be always `1` // The stepSize of the SpinBox is intentionally set to be always `1`
// As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution // As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution
// increasing the spinBox.value by one increases the actual/real value of the component by `base.stepSize` // increasing the spinBox.value by one increases the actual/real value of the component by `base.stepSize`