aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/rect/GradientRect.qml')
-rw-r--r--tests/auto/declarative/qmlvisual/rect/GradientRect.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
new file mode 100644
index 0000000000..5ac7dcf239
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
@@ -0,0 +1,25 @@
+import QtQuick 1.0
+
+Item {
+ id: rect
+ property color color
+ property color border : Qt.rgba(0,0,0,0)
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 40; height: 40
+ Item {
+ anchors.centerIn: parent; rotation: rect.rotation;
+ Rectangle {
+ anchors.centerIn: parent; width: 40; height: 40
+ border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
+ radius: rect.radius; smooth: rect.smooth
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: rect.color }
+ GradientStop { position: 1.0; color: "white" }
+ }
+ }
+ }
+}