diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-02 15:12:05 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-07 08:33:33 +0000 |
commit | 5af4c9b237a23ce12ca7c56eb6c9ecda17743228 (patch) | |
tree | fe8f85d5c353216cddc18df3c996be0c50cf0c67 /examples/quick/shapes/content/item4.qml | |
parent | 961da5273e17655e73ec0975c6de446b88d7f5ca (diff) |
Reduce objects: Make ShapePath inherit Path
Shape { ShapePath { Path { ... } } } simply becomes
Shape { ShapePath { ... } }
Change-Id: Ie57936cd7953c8a8d6c67e78b9d73bdbe2a05316
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick/shapes/content/item4.qml')
-rw-r--r-- | examples/quick/shapes/content/item4.qml | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/examples/quick/shapes/content/item4.qml b/examples/quick/shapes/content/item4.qml index 5f0704a48d..2b20c0a263 100644 --- a/examples/quick/shapes/content/item4.qml +++ b/examples/quick/shapes/content/item4.qml @@ -58,30 +58,28 @@ Rectangle { anchors.fill: parent ShapePath { + id: p strokeWidth: 5 strokeColor: "blue" strokeStyle: ShapePath.DashLine dashPattern: [ 1, 4, 4, 4 ] fillColor: "lightBlue" - Path { - id: p - property real xr: 70 - property real yr: 30 - startX: shape.width / 2 - xr - startY: shape.height / 2 - yr - PathArc { - x: shape.width / 2 + p.xr - y: shape.height / 2 + p.yr - radiusX: p.xr; radiusY: p.yr - useLargeArc: true - } - PathArc { - x: shape.width / 2 - p.xr - y: shape.height / 2 - p.yr - radiusX: p.xr; radiusY: p.yr - useLargeArc: true - } + property real xr: 70 + property real yr: 30 + startX: shape.width / 2 - xr + startY: shape.height / 2 - yr + PathArc { + x: shape.width / 2 + p.xr + y: shape.height / 2 + p.yr + radiusX: p.xr; radiusY: p.yr + useLargeArc: true + } + PathArc { + x: shape.width / 2 - p.xr + y: shape.height / 2 - p.yr + radiusX: p.xr; radiusY: p.yr + useLargeArc: true } } } |