@@ -20,24 +20,57 @@ import Ubuntu.Components 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import "../Components"
21import "../Components"
24 id: callHint
24 id: callHint
26 readonly property bool active: callManager.hasCalls && ApplicationManager.focusedApplicationId !== "dialer-app"
26 readonly property bool active: callManager.hasCalls && ApplicationManager.focusedApplicationId !== "dialer-app"
27 readonly property QtObject contactWatcher: _contactWatcher
27 readonly property QtObject contactWatcher: _contactWatcher
28 property int alternateLabelInterval: 4000
28 property int alternateLabelInterval: 4000
29+ property color color: Qt.rgba(0.1, 0.6, 0.1, 1.0)
30+ property color colorFlash: Qt.rgba(0.1, 0.9, 0.1, 1.0)
30 Component.onCompleted: {
32 Component.onCompleted: {
31 telepathyHelper.registerChannelObserver("unity8");
33 telepathyHelper.registerChannelObserver("unity8");
34− color: Qt.rgba(0,0.8,0,1)
36+ Rectangle {
35− clip: true
37+ id: background
38 anchors.fill: parent
38 anchors.fill: parent
39− onClicked: {
39+ color: callHint.color
40− ApplicationManager.requestFocusApplication("dialer-app");
40+
47+ PropertyChanges { target: background; color: callHint.colorFlash }
55+ ColorAnimation { duration: 260; easing.type: Easing.InQuart }
59+ ColorAnimation { duration: 150; easing.type: Easing.OutQuad }
64+ running: callHint.active && color != colorFlash
65+ interval: background.state == "fade-down" ? 3000 : 400
68+ if (background.state == "fade-down") {
69+ background.state = "fade-up";
71+ background.state = "fade-down";
@@ -109,6 +142,7 @@ Rectangle {
109 right: time.left
142 right: time.left
111 height: columnHeight > callHint.height ? callHint.height : columnHeight
144 height: columnHeight > callHint.height ? callHint.height : columnHeight
113 property Column column1
147 property Column column1
114 property Column column2
148 property Column column2
@@ -117,6 +151,7 @@ Rectangle {
117 delegate: contactColumnRow
151 delegate: contactColumnRow
119 offset: 0
153 offset: 0
121 path: Path {
156 path: Path {
122 startY: -labelPathView.columnHeight / 2
157 startY: -labelPathView.columnHeight / 2
@@ -131,7 +166,7 @@ Rectangle {
131 id: offsetAnimation
166 id: offsetAnimation
132 // ensure we go faster than the label switch
167 // ensure we go faster than the label switch
133 duration: alternateLabelInterval / 2
168 duration: alternateLabelInterval / 2
134− velocity: 1.0
169+ velocity: 0.75
135 easing.type: Easing.InOutQuad
170 easing.type: Easing.InOutQuad
@@ -139,12 +174,12 @@ Rectangle {
140 // Fade in text
175 // Fade in text
141 Rectangle {
176 Rectangle {
142− anchors.fill: labelPathView
177+ anchors.fill: parent
143 gradient: Gradient {
178 gradient: Gradient {
144− GradientStop { position: 0.0; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 1.0) }
179+ GradientStop { position: 0.0; color: background.color }
145− GradientStop { position: 0.25; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 0.0) }
180+ GradientStop { position: 0.25; color: Qt.rgba(background.color.r, background.color.g, background.color.b, 0.0) }
146− GradientStop { position: 0.75; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 0.0) }
181+ GradientStop { position: 0.75; color: Qt.rgba(background.color.r, background.color.g, background.color.b, 0.0) }
147− GradientStop { position: 1.0; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 1.0) }
182+ GradientStop { position: 1.0; color: background.color }
@@ -191,6 +226,13 @@ Rectangle {
230+ anchors.fill: parent
232+ ApplicationManager.requestFocusApplication("dialer-app");
194 Telephony.ContactWatcher {
236 Telephony.ContactWatcher {
195 id: _contactWatcher
237 id: _contactWatcher
196 objectName: "contactWatcher"
238 objectName: "contactWatcher"