diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-02 11:23:13 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-05-09 08:26:57 +0000 |
commit | 99928905f2104ff7b7d659f7fd42ffe7d929aeb4 (patch) | |
tree | 15c124ac6b8dadc8200d7c6797aec16d4b649e8d /src/imports/controls/imagine/Slider.qml | |
parent | 677d9420622fcc9138606260da380d1d794b6685 (diff) |
Imagine: use background insets
All others have been updated, except GroupBox that has some strange
special handling for positioning the background.
Change-Id: Ief5a68cbeedbdc3c66b85e8d03198f70e35aac61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/imagine/Slider.qml')
-rw-r--r-- | src/imports/controls/imagine/Slider.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/controls/imagine/Slider.qml b/src/imports/controls/imagine/Slider.qml index 75a7aaf0..f39bab70 100644 --- a/src/imports/controls/imagine/Slider.qml +++ b/src/imports/controls/imagine/Slider.qml @@ -52,6 +52,11 @@ T.Slider { rightPadding: background ? background.rightPadding : 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 + handle: Image { x: Math.round(control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)) y: Math.round(control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))) @@ -71,9 +76,6 @@ T.Slider { } background: NinePatchImage { - x: -leftInset; y: -topInset - width: control.width + leftInset + rightInset - height: control.height + topInset + bottomInset scale: control.horizontal && control.mirrored ? -1 : 1 source: Imagine.url + "slider-background" |