diff options
Diffstat (limited to 'src/quickcontrols/ios/SpinBox.qml')
-rw-r--r-- | src/quickcontrols/ios/SpinBox.qml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/quickcontrols/ios/SpinBox.qml b/src/quickcontrols/ios/SpinBox.qml index ed4e4c1bc7..11131a0db1 100644 --- a/src/quickcontrols/ios/SpinBox.qml +++ b/src/quickcontrols/ios/SpinBox.qml @@ -8,16 +8,14 @@ import QtQuick.Controls.impl T.SpinBox { id: control + + // Note: the width of the indicators are calculated into the padding implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentItem.implicitWidth + 2 * padding + - up.implicitIndicatorWidth + - down.implicitIndicatorWidth) - implicitHeight: Math.max(implicitContentHeight + topPadding + bottomPadding, - implicitBackgroundHeight, - up.implicitIndicatorHeight, - down.implicitIndicatorHeight) + contentItem.implicitWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + up.implicitIndicatorHeight, down.implicitIndicatorHeight) - padding: 0 leftPadding: control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0) rightPadding: control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0) @@ -42,6 +40,7 @@ T.SpinBox { readOnly: !control.editable validator: control.validator inputMethodHints: control.inputMethodHints + clip: width < implicitWidth } up.indicator: NinePatchImage { |