diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-03-03 18:07:39 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-10 15:27:47 +0000 |
commit | 8ae4ab2e049b09d7330a7e0e0a4b20f216f6b90b (patch) | |
tree | 6a704b6df64b997999d1a8988edab636a7539092 /examples/quick/shapes/radialGradient.qml | |
parent | 2af9e2f77cbec6e704a1fcafe249c4df8a0215cb (diff) |
Shapes example: adhere to guidelines
- Fix all qmllint warnings.
(except for main.qml, interactive.qml, and sampling.qml)
- Translate user facing strings when it makes sense to do so.
- Mark readonly properties as 'readonly'.
- Avoid binding on multiple properties on a single line.
(except for tiger.qml).
Change-Id: Idbf8a472ca5ba5385d1368aadd608e95231a07f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit e61d555a6d3b0796be725d4ee7190e8d4331ba38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/shapes/radialGradient.qml')
-rw-r--r-- | examples/quick/shapes/radialGradient.qml | 76 |
1 files changed, 61 insertions, 15 deletions
diff --git a/examples/quick/shapes/radialGradient.qml b/examples/quick/shapes/radialGradient.qml index 5fd3670b28..cb89be7e6b 100644 --- a/examples/quick/shapes/radialGradient.qml +++ b/examples/quick/shapes/radialGradient.qml @@ -16,27 +16,73 @@ Rectangle { strokeWidth: 4 strokeColor: "red" fillGradient: LinearGradient { - x1: 20; y1: 20 - x2: 180; y2: 130 - 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" } + x1: 20 + y1: 20 + x2: 180 + y2: 130 + 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 dashPattern: [ 1, 4 ] - startX: 20; startY: 20 - PathLine { x: 180; y: 130 } - PathLine { x: 20; y: 130 } - PathLine { x: 20; y: 20 } + startX: 20 + startY: 20 + PathLine { + x: 180 + y: 130 + } + PathLine { + x: 20 + y: 130 + } + PathLine { + x: 20 + y: 20 + } } - transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 } + transform: Rotation { + origin.x: 100 + origin.y: 50 + axis { + x: 0 + y: 1 + z: 0 + } SequentialAnimation on angle { - NumberAnimation { from: 0; to: 75; duration: 2000 } - NumberAnimation { from: 75; to: -75; duration: 4000 } - NumberAnimation { from: -75; to: 0; duration: 2000 } + NumberAnimation { + from: 0 + to: 75 + duration: 2000 + } + NumberAnimation { + from: 75 + to: -75 + duration: 4000 + } + NumberAnimation { + from: -75 + to: 0 + duration: 2000 + } loops: Animation.Infinite } } |