summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-05-27 07:00:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-05-27 07:00:37 (GMT)
commited5d5f6f04cda1f7aa3ea66be5fefc0a85429794 (patch)
treeb8244c7f0cd8b50e18faf64508a32c94f274a698 /demos
parent411678df3e25304b105e5f3afc849b529baa0d6f (diff)
downloadQt-ed5d5f6f04cda1f7aa3ea66be5fefc0a85429794.zip
Qt-ed5d5f6f04cda1f7aa3ea66be5fefc0a85429794.tar.gz
Qt-ed5d5f6f04cda1f7aa3ea66be5fefc0a85429794.tar.bz2
Better gradient support for Rect.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/content/Progress.qml14
-rw-r--r--demos/declarative/flickr/content/Slider.qml15
2 files changed, 22 insertions, 7 deletions
diff --git a/demos/declarative/flickr/content/Progress.qml b/demos/declarative/flickr/content/Progress.qml
index aa2a2e6..743c45e 100644
--- a/demos/declarative/flickr/content/Progress.qml
+++ b/demos/declarative/flickr/content/Progress.qml
@@ -4,8 +4,12 @@ Item {
property var progress: 0
Rect {
- id: Container; anchors.fill: parent; gradientColor: "#66000000";
- pen.color: "white"; pen.width: 0; color: "#66343434"; radius: height/2 - 2
+ id: Container; anchors.fill: parent
+ pen.color: "white"; pen.width: 0; radius: height/2 - 2
+ gradient: Gradient {
+ GradientStop { position: 0; color: "#66343434" }
+ GradientStop { position: 1.0; color: "#66000000" }
+ }
}
Rect {
@@ -13,7 +17,11 @@ Item {
y: 2; height: parent.height-4;
x: 2; width: Math.max(parent.width * progress - 4, 0);
opacity: width < 1 ? 0 : 1
- color: "lightsteelblue"; gradientColor: "steelblue"; radius: height/2 - 2
+ gradient: Gradient {
+ GradientStop { position: 0; color: "lightsteelblue" }
+ GradientStop { position: 1.0; color: "steelblue" }
+ }
+ radius: height/2 - 2
}
Text {
diff --git a/demos/declarative/flickr/content/Slider.qml b/demos/declarative/flickr/content/Slider.qml
index aae4631..6aff225 100644
--- a/demos/declarative/flickr/content/Slider.qml
+++ b/demos/declarative/flickr/content/Slider.qml
@@ -9,14 +9,21 @@ Item {
property int xMax: Slider.width - Handle.width - 4
Rect {
- id: Container; anchors.fill: parent; gradientColor: "#66000000";
- pen.color: "white"; pen.width: 0; color: "#66343434"; radius: 8
+ id: Container; anchors.fill: parent
+ pen.color: "white"; pen.width: 0; radius: 8
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#66343434" },
+ GradientStop { position: 1.0; color: "#66000000" }
+ }
}
Rect {
id: Handle
- x: Slider.width / 2 - Handle.width / 2; y: 2; width: 30; height: Slider.height-4
- color: "lightgray"; gradientColor: "gray"; radius: 6
+ x: Slider.width / 2 - Handle.width / 2; y: 2; width: 30; height: Slider.height-4; radius: 6
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightgray" },
+ GradientStop { position: 1.0; color: "gray" }
+ }
MouseRegion {
anchors.fill: parent; drag.target: parent