diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-04-26 23:18:37 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-04-26 23:18:37 (GMT) |
commit | 0ef80e4c17595e04db3926be09b504acf1e02075 (patch) | |
tree | a81f0419e9cae4d8390705239f7f178c110581c6 /examples | |
parent | 63c10310c31587453ffb33fc9658ba21c751c69b (diff) | |
download | Qt-0ef80e4c17595e04db3926be09b504acf1e02075.zip Qt-0ef80e4c17595e04db3926be09b504acf1e02075.tar.gz Qt-0ef80e4c17595e04db3926be09b504acf1e02075.tar.bz2 |
Tweak the Dial example.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/dial/DialLibrary/Dial.qml | 6 | ||||
-rw-r--r-- | examples/declarative/dial/dial.qml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index e1b9f18..e2a11b1 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -1,12 +1,12 @@ <Item width="210" height="210"> <properties><Property name="value" type="real" value="0"/></properties> <Image id="Background" src="background.svg"/> + <Item x="104" y="102" rotation="{Needle.rotation}"> + <Image src="needle_shadow.svg" x="-104" y="-102"/> + </Item> <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="{Needle.rotation}"> - <Image src="needle_shadow.svg" x="-104" y="-102"/> - </Item> <Image src="overlay.svg"/> </Item> diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml index ce43b01..bda9b41 100644 --- a/examples/declarative/dial/dial.qml +++ b/examples/declarative/dial/dial.qml @@ -3,7 +3,7 @@ <!-- Dial with a slider to adjust it --> <Dial id="Dial" value="{Slider.x-2}"/> <Rect anchors.top="{Dial.bottom}" x="20" width="160" height="16" color="steelblue" gradientColor="lightsteelblue" radius="8" opacity="0.7"> - <Rect id="Slider" anchors.top="{Dial.bottom}" x="2" y="2" width="30" height="12" color="lightgray" gradientColor="gray" radius="6"> + <Rect id="Slider" x="2" y="2" width="30" height="12" color="lightgray" gradientColor="gray" radius="6"> <MouseRegion anchors.fill="{parent}" drag.target="{parent}" drag.axis="x" |