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/RangeSlider.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/RangeSlider.qml')
-rw-r--r-- | src/imports/controls/imagine/RangeSlider.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml index fa7fdda0..5461cf01 100644 --- a/src/imports/controls/imagine/RangeSlider.qml +++ b/src/imports/controls/imagine/RangeSlider.qml @@ -54,6 +54,11 @@ T.RangeSlider { 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 + first.handle: Image { x: control.leftPadding + (control.horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height)) @@ -93,9 +98,6 @@ T.RangeSlider { } 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 + "rangeslider-background" |