diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-23 03:18:36 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-23 03:18:36 (GMT) |
commit | 0841d5e59ea40f9ac92d24b135ea2ae273dee68d (patch) | |
tree | 501c3e69b91a3995123dff17ce0e8a9df777f02a | |
parent | bea6223ce782aae26c1c0fb7ee5166403b2056bb (diff) | |
download | Qt-0841d5e59ea40f9ac92d24b135ea2ae273dee68d.zip Qt-0841d5e59ea40f9ac92d24b135ea2ae273dee68d.tar.gz Qt-0841d5e59ea40f9ac92d24b135ea2ae273dee68d.tar.bz2 |
Simplify dial example.
As Item::rotation is a subscribable property, the second (identical) Follow is
unnecessary.
-rw-r--r-- | examples/declarative/dial/DialLibrary/Dial.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index acff119..e1b9f18 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -1,12 +1,11 @@ <Item width="210" height="210"> <properties><Property name="value" type="real" value="0"/></properties> <Image id="Background" src="background.svg"/> - <Item x="102" y="98" rotation="-130"> + <Item id="Needle" x="102" y="98" rotation="-130"> <rotation><Follow spring="1.4" damping=".15" source="{Math.min(Math.max(-130, value*2.2 - 130), 133)}"/></rotation> <Image src="needle.svg" x="-102" y="-98"/> </Item> - <Item x="104" y="102" rotation="-130"> - <rotation><Follow spring="1.4" damping=".15" source="{Math.min(Math.max(-130, value*2.2 - 130), 133)}"/></rotation> + <Item x="104" y="102" rotation="{Needle.rotation}"> <Image src="needle_shadow.svg" x="-104" y="-102"/> </Item> <Image src="overlay.svg"/> |