aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/RangeSlider.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-09-13 11:32:27 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-09-14 09:05:26 +0000
commit7cbf3685565d7f62c9a01b090a4c1600b4abe220 (patch)
tree20baffc826c01b9695d2d104c07b78f5196cf9c0 /src/imports/controls/imagine/RangeSlider.qml
parentc829b2a8b4e80cf9b829b3ead0a69722c1b04a1a (diff)
Imagine: fix QRC paths
Using ApplicationWindow as an example, its NinePatchImage url is assigned like so: source: Imagine.path + "applicationwindow-background" If Imagine.path is set to ":/images" by the user, then the final URL would be: QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls.2/Imagine/:/images/applicationwindow-background") We could use a QUrl for QQuickImagineStyle::path, but we don't want to support anything other than local paths. Instead, we add a private "url" property that returns a URL that we construct correctly in C++ ourselves, and then the Imagine QML controls files use that property. Change-Id: Ic4d1910bbc7f7b6f80f257496ae6131777a19401 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/imagine/RangeSlider.qml')
-rw-r--r--src/imports/controls/imagine/RangeSlider.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml
index 7a43da0e..b902806a 100644
--- a/src/imports/controls/imagine/RangeSlider.qml
+++ b/src/imports/controls/imagine/RangeSlider.qml
@@ -58,7 +58,7 @@ T.RangeSlider {
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))
- source: Imagine.path + "rangeslider-handle"
+ source: Imagine.url + "rangeslider-handle"
ImageSelector on source {
states: [
{"first": true},
@@ -77,7 +77,7 @@ T.RangeSlider {
x: control.leftPadding + (control.horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
- source: Imagine.path + "rangeslider-handle"
+ source: Imagine.url + "rangeslider-handle"
ImageSelector on source {
states: [
{"second": true},
@@ -98,7 +98,7 @@ T.RangeSlider {
height: control.height + topInset + bottomInset
scale: control.horizontal && control.mirrored ? -1 : 1
- source: Imagine.path + "rangeslider-background"
+ source: Imagine.url + "rangeslider-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -116,7 +116,7 @@ T.RangeSlider {
width: control.horizontal ? control.second.position * (parent.width - control.first.handle.width) - control.first.position * (parent.width - control.first.handle.width) : parent.width
height: control.vertical ? control.second.position * (parent.height - control.first.handle.height) - control.first.position * (parent.height - control.first.handle.height): parent.height
- source: Imagine.path + "rangeslider-progress"
+ source: Imagine.url + "rangeslider-progress"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},