diff options
Diffstat (limited to 'src/quickcontrols/macos/SpinBox.qml')
-rw-r--r-- | src/quickcontrols/macos/SpinBox.qml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/quickcontrols/macos/SpinBox.qml b/src/quickcontrols/macos/SpinBox.qml index 555b49eb32..dcc52f0ab2 100644 --- a/src/quickcontrols/macos/SpinBox.qml +++ b/src/quickcontrols/macos/SpinBox.qml @@ -8,9 +8,12 @@ import QtQuick.NativeStyle as NativeStyle T.SpinBox { id: control - implicitWidth: Math.max(implicitContentWidth + leftInset + rightInset) - implicitHeight: Math.max(implicitContentHeight, up.implicitIndicatorHeight + down.implicitIndicatorHeight) - + topInset + bottomInset + // Note: the width of the indicators are calculated into the padding + 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 rightPadding: up.implicitIndicatorWidth + spacing @@ -31,7 +34,7 @@ T.SpinBox { selectedTextColor: control.palette.highlightedText horizontalAlignment: Qt.AlignLeft verticalAlignment: Qt.AlignVCenter - implicitWidth: 100 // From IB XCode + implicitWidth: Math.max(100 /* from IB XCode */, contentWidth + leftPadding + rightPadding) topPadding: 2 bottomPadding: 2 |