From f4f89858cffa1107af5139dfb1e1d7b16ca3a1a0 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 6 Jun 2017 14:54:37 +0200 Subject: 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 Reviewed-by: J-P Nurmi --- tests/manual/shapestest/shapestest.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/manual/shapestest/shapestest.qml') 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 -- cgit v1.2.3