aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/SpinBox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/imagine/SpinBox.qml')
-rw-r--r--src/imports/controls/imagine/SpinBox.qml32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/imports/controls/imagine/SpinBox.qml b/src/imports/controls/imagine/SpinBox.qml
index 1ef862f5..866db7fc 100644
--- a/src/imports/controls/imagine/SpinBox.qml
+++ b/src/imports/controls/imagine/SpinBox.qml
@@ -34,29 +34,33 @@
**
****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Templates 2.4 as T
-import QtQuick.Controls.Imagine 2.4
-import QtQuick.Controls.Imagine.impl 2.4
+import QtQuick 2.12
+import QtQuick.Templates 2.5 as T
+import QtQuick.Controls.Imagine 2.5
+import QtQuick.Controls.Imagine.impl 2.5
T.SpinBox {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentItem.implicitWidth + 2 * padding +
- (up.indicator ? up.indicator.implicitWidth : 0) +
- (down.indicator ? down.indicator.implicitWidth : 0))
- implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding,
- background ? background.implicitHeight : 0,
- up.indicator ? up.indicator.implicitHeight : 0,
- down.indicator ? down.indicator.implicitHeight : 0)
- baselineOffset: contentItem.y + contentItem.baselineOffset
+ up.implicitIndicatorWidth +
+ down.implicitIndicatorWidth)
+ implicitHeight: Math.max(implicitContentHeight + topPadding + bottomPadding,
+ implicitBackgroundHeight,
+ up.implicitIndicatorHeight,
+ down.implicitIndicatorHeight)
topPadding: background ? background.topPadding : 0
leftPadding: (background ? background.leftPadding : 0) + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
rightPadding: (background ? background.rightPadding : 0) + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
bottomPadding: background ? background.bottomPadding : 0
+ topInset: background ? -background.topInset || 0 : 0
+ leftInset: background ? -background.leftInset || 0 : 0
+ rightInset: background ? -background.rightInset || 0 : 0
+ bottomInset: background ? -background.bottomInset || 0 : 0
+
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
@@ -134,10 +138,6 @@ T.SpinBox {
}
background: NinePatchImage {
- x: -leftInset; y: -topInset
- width: control.width + leftInset + rightInset
- height: control.height + topInset + bottomInset
-
source: Imagine.url + "spinbox-background"
NinePatchImageSelector on source {
states: [