diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-11 07:49:26 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-11 07:49:26 (GMT) |
commit | 415da7f2969bad2765fe535daf9322c7a538da81 (patch) | |
tree | 9f5c69acd4cfa532d8f5136fb60e6b9f0b55e8b3 /examples/declarative/dial | |
parent | b3526f5edf6425289ef2aa5c8adfc89892817ac0 (diff) | |
download | Qt-415da7f2969bad2765fe535daf9322c7a538da81.zip Qt-415da7f2969bad2765fe535daf9322c7a538da81.tar.gz Qt-415da7f2969bad2765fe535daf9322c7a538da81.tar.bz2 |
Join some lines in examples.
Diffstat (limited to 'examples/declarative/dial')
-rw-r--r-- | examples/declarative/dial/DialLibrary/Dial.qml | 24 | ||||
-rw-r--r-- | examples/declarative/dial/dial.qml | 34 |
2 files changed, 17 insertions, 41 deletions
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index 485188a..2e214a8 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -1,27 +1,20 @@ Item { property real value : 0 - width: 210 - height: 210 + width: 210; height: 210 - Image { - id: Background - source: "background.svg" - } + Image { id: Background; source: "background.svg" } Item { - x: 104 - y: 102 + x: 104; y: 102 rotation: Needle.rotation Image { source: "needle_shadow.svg" - x: -104 - y: -102 + x: -104; y: -102 } } Item { id: Needle - x: 102 - y: 98 + x: 102; y: 98 rotation: -130 rotation: Follow { spring: 1.4 @@ -30,11 +23,8 @@ Item { } Image { source: "needle.svg" - x: -102 - y: -98 + x: -102; y: -98 } } - Image { - source: "overlay.svg" - } + Image { source: "overlay.svg" } } diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml index fa11d79..5e09171 100644 --- a/examples/declarative/dial/dial.qml +++ b/examples/declarative/dial/dial.qml @@ -1,37 +1,23 @@ import "DialLibrary" Rect { color: "white" - width: 210 - height: 240 + width: 210; height: 240 + // Dial with a slider to adjust it - Dial { - id: Dial - value: Slider.x-2 - } + 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 + x: 20; width: 160; height: 16 + color: "steelblue"; gradientColor: "lightsteelblue" + radius: 8; opacity: 0.7 Rect { id: Slider - x: 2 - y: 2 - width: 30 - height: 12 - color: "lightgray" - gradientColor: "gray" - radius: 6 + x: 2; y: 2; width: 30; height: 12 + color: "lightgray"; gradientColor: "gray"; radius: 6 MouseRegion { anchors.fill: parent - drag.target: parent - drag.axis: "x" - drag.xmin: 2 - drag.xmax: 128 + drag.target: parent; drag.axis: "x"; drag.xmin: 2; drag.xmax: 128 } } } |