@@ -41,25 +41,13 @@ Item {
41 property real offset: 0
41 property real offset: 0
42 property real itemOpacity: 1
42 property real itemOpacity: 1
43 property real brightness: 0
43 property real brightness: 0
44− property real wiggleAngle: 0
44+ property double maxWiggleAngle: 5.0
46− signal alertingTriggered(int alertIndex)
47− signal alertingEnded(int alertIndex)
51− alertingTriggered(index)
57 QtObject {
46 QtObject {
58− id: privWiggleAnim
47+ id: priv
60− readonly property double angle: 5.0
61− readonly property int duration: UbuntuAnimation.SnapDuration
49+ readonly property int wiggleDuration: UbuntuAnimation.SnapDuration
62− readonly property var target: root
50+ property real wiggleAngle: 0
65 SequentialAnimation {
53 SequentialAnimation {
@@ -70,61 +58,61 @@ Item {
70 alwaysRunToEnd: true
58 alwaysRunToEnd: true
72 NumberAnimation {
60 NumberAnimation {
73− target: privWiggleAnim.target
61+ target: priv
74 property: "wiggleAngle"
62 property: "wiggleAngle"
76− to: privWiggleAnim.angle
64+ to: maxWiggleAngle
77− duration: privWiggleAnim.duration
65+ duration: priv.wiggleDuration
78 easing.type: Easing.InQuad
66 easing.type: Easing.InQuad
81 NumberAnimation {
69 NumberAnimation {
82− target: privWiggleAnim.target
70+ target: priv
83 property: "wiggleAngle"
71 property: "wiggleAngle"
84− from: privWiggleAnim.angle
72+ from: maxWiggleAngle
85− to: -privWiggleAnim.angle
73+ to: -maxWiggleAngle
86− duration: privWiggleAnim.duration
74+ duration: priv.wiggleDuration
87 easing.type: Easing.InOutQuad
75 easing.type: Easing.InOutQuad
90 NumberAnimation {
78 NumberAnimation {
91− target: privWiggleAnim.target
79+ target: priv
92 property: "wiggleAngle"
80 property: "wiggleAngle"
93− from: -privWiggleAnim.angle
81+ from: -maxWiggleAngle
94− to: privWiggleAnim.angle
82+ to: maxWiggleAngle
95− duration: privWiggleAnim.duration
83+ duration: priv.wiggleDuration
96 easing.type: Easing.InOutQuad
84 easing.type: Easing.InOutQuad
99 NumberAnimation {
87 NumberAnimation {
100− target: privWiggleAnim.target
88+ target: priv
101 property: "wiggleAngle"
89 property: "wiggleAngle"
102− from: privWiggleAnim.angle
90+ from: maxWiggleAngle
103− to: -privWiggleAnim.angle
91+ to: -maxWiggleAngle
104− duration: privWiggleAnim.duration
92+ duration: priv.wiggleDuration
105 easing.type: Easing.InOutQuad
93 easing.type: Easing.InOutQuad
108 NumberAnimation {
96 NumberAnimation {
109− target: privWiggleAnim.target
97+ target: priv
110 property: "wiggleAngle"
98 property: "wiggleAngle"
111− from: -privWiggleAnim.angle
99+ from: -maxWiggleAngle
112− to: privWiggleAnim.angle
100+ to: maxWiggleAngle
113− duration: privWiggleAnim.duration
101+ duration: priv.wiggleDuration
114 easing.type: Easing.InOutQuad
102 easing.type: Easing.InOutQuad
117 NumberAnimation {
105 NumberAnimation {
118− target: privWiggleAnim.target
106+ target: priv
119 property: "wiggleAngle"
107 property: "wiggleAngle"
120− from: privWiggleAnim.angle
108+ from: maxWiggleAngle
122− duration: privWiggleAnim.duration
110+ duration: priv.wiggleDuration
123 easing.type: Easing.OutQuad
111 easing.type: Easing.OutQuad
126 UbuntuNumberAnimation {
114 UbuntuNumberAnimation {
127− target: privWiggleAnim.target
115+ target: root
128 property: "alerting"
116 property: "alerting"
@@ -263,7 +251,7 @@ Item {
263 Rotation {
251 Rotation {
264 axis { x: 0; y: 0; z: 1 }
252 axis { x: 0; y: 0; z: 1 }
265 origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
253 origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
266− angle: root.wiggleAngle
254+ angle: priv.wiggleAngle
268 // Rotating 3 times at top/bottom because that increases the perspective.
256 // Rotating 3 times at top/bottom because that increases the perspective.
269 // This is a hack, but as QML does not support real 3D coordinates
257 // This is a hack, but as QML does not support real 3D coordinates