diff options
Diffstat (limited to 'src/quickcontrols/windows/SpinBox.qml')
-rw-r--r-- | src/quickcontrols/windows/SpinBox.qml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/quickcontrols/windows/SpinBox.qml b/src/quickcontrols/windows/SpinBox.qml index 34fbfddbcf..982a5868a3 100644 --- a/src/quickcontrols/windows/SpinBox.qml +++ b/src/quickcontrols/windows/SpinBox.qml @@ -12,18 +12,15 @@ T.SpinBox { && down.indicator.hasOwnProperty("_qt_default") readonly property bool __notCustomizable: true - implicitWidth: Math.max(contentItem.implicitWidth + leftInset + rightInset, - 90 /* minimum */ ) - implicitHeight: Math.max(contentItem.implicitHeight, up.implicitIndicatorHeight + down.implicitIndicatorHeight) - + topInset + bottomInset + // Note: the indicators are inside the contentItem + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentItem.implicitWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + up.implicitIndicatorHeight + down.implicitIndicatorHeight) spacing: 2 - leftPadding: 0 - topPadding: 0 - rightPadding: rightInset - bottomPadding: 0 - validator: IntValidator { locale: control.locale.name bottom: Math.min(control.from, control.to) @@ -38,16 +35,19 @@ T.SpinBox { selectedTextColor: control.palette.highlightedText horizontalAlignment: Qt.AlignLeft verticalAlignment: Qt.AlignVCenter + implicitWidth: Math.max(90 /* minimum */, contentWidth + leftPadding + rightPadding) topPadding: 0 bottomPadding: 0 leftPadding: 10 - rightPadding: 10 + rightPadding: up.indicator.width + 10 readOnly: !control.editable validator: control.validator inputMethodHints: control.inputMethodHints + clip: width < implicitWidth + readonly property bool __ignoreNotCustomizable: true // Since the indicators are embedded inside the TextField we need to avoid that |