Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / rect / GradientRect.qml
1 import QtQuick 1.0
2
3 Item {
4     id: rect
5     property color color
6     property color border : Qt.rgba(0,0,0,0)
7     property int rotation
8     property int radius
9     property int borderWidth
10     property bool smooth: false
11
12     width: 40; height: 40
13     Item {
14         anchors.centerIn: parent; rotation: rect.rotation;
15         Rectangle {
16             anchors.centerIn: parent; width: 40; height: 40
17             border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
18             radius: rect.radius; smooth: rect.smooth
19             gradient: Gradient {
20                 GradientStop { position: 0.0; color: rect.color }
21                 GradientStop { position: 1.0; color: "white" }
22             }
23         }
24     }
25 }