summaryrefslogtreecommitdiff
path: root/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
commit12a5ddf456ba8549645a8cb28a8b4ed6197a14da (patch)
tree63ee2c88af936e0609a3a194f5bcc304c4c0b707 /tests/auto/declarative/qmlvisual/rect/GradientRect.qml
downloadqtquick1-12a5ddf456ba8549645a8cb28a8b4ed6197a14da.tar.gz
Import relevant source from Qt 4.8
Change-Id: I5078db4081d95290c54f39d3c0efc2fc2f62e6a6
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 00000000..5ac7dcf2
--- /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" }
+ }
+ }
+ }
+}