diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-06 14:54:37 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-08 10:32:18 +0000 |
commit | f4f89858cffa1107af5139dfb1e1d7b16ca3a1a0 (patch) | |
tree | 848471b6d85eebfea8915f1da89b26286f0dbbc7 /tests/manual | |
parent | 8a5837467d153c50c869625390a584b0335b77b7 (diff) |
Use GradientStop and rename ShapeLinearGradient to LinearGradient
Thus application code becomes:
ShapePath {
...
fillGradient: LinearGradient {
...
GradientStop { ... }
}
}
which is even more clean and readable. The duplication for stops is
now avoided.
Change-Id: I50ae2f388e21683a37dc4787763dc71e16eef4f5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/shapestest/shapestest.qml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/manual/shapestest/shapestest.qml b/tests/manual/shapestest/shapestest.qml index bf503c12d9..df53f088ae 100644 --- a/tests/manual/shapestest/shapestest.qml +++ b/tests/manual/shapestest/shapestest.qml @@ -83,14 +83,14 @@ Rectangle { ShapePath { strokeWidth: 4 strokeColor: "red" - fillGradient: ShapeLinearGradient { + fillGradient: LinearGradient { x1: 0; y1: 0 x2: 200; y2: 100 - ShapeGradientStop { position: 0; color: "blue" } - ShapeGradientStop { position: 0.2; color: "green" } - ShapeGradientStop { position: 0.4; color: "red" } - ShapeGradientStop { position: 0.6; color: "yellow" } - ShapeGradientStop { position: 1; color: "cyan" } + GradientStop { position: 0; color: "blue" } + GradientStop { position: 0.2; color: "green" } + GradientStop { position: 0.4; color: "red" } + GradientStop { position: 0.6; color: "yellow" } + GradientStop { position: 1; color: "cyan" } } fillColor: "blue" // ignored with the gradient set strokeStyle: ShapePath.DashLine |