summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/dial/DialLibrary/Dial.qml34
1 files changed, 17 insertions, 17 deletions
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml
index 2e214a8..e3fd382 100644
--- a/examples/declarative/dial/DialLibrary/Dial.qml
+++ b/examples/declarative/dial/DialLibrary/Dial.qml
@@ -4,26 +4,26 @@ Item {
width: 210; height: 210
Image { id: Background; source: "background.svg" }
- Item {
- x: 104; y: 102
- rotation: Needle.rotation
- Image {
- source: "needle_shadow.svg"
- x: -104; y: -102
+
+ Image {
+ source: "needle_shadow.svg"
+ transform: Rotation {
+ originX: 104; originY: 102
+ angle: NeedleRotation.angle
}
}
- Item {
+ Image {
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)
- }
- Image {
- source: "needle.svg"
- x: -102; y: -98
+ source: "needle.svg"
+ transform: Rotation {
+ id: NeedleRotation
+ originX: 102; originY: 98
+ angle: -130
+ angle: Follow {
+ spring: 1.4
+ damping: .15
+ source: Math.min(Math.max(-130, value*2.2 - 130), 133)
+ }
}
}
Image { source: "overlay.svg" }