@@ -20,24 +20,57 @@ import Ubuntu.Components 0.1
2020import Unity.Application 0.1
2121import "../Components"
2222
23−Rectangle {
23+Item {
2424 id: callHint
2525
2626 readonly property bool active: callManager.hasCalls && ApplicationManager.focusedApplicationId !== "dialer-app"
2727 readonly property QtObject contactWatcher: _contactWatcher
2828 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)
2931
3032 Component.onCompleted: {
3133 telepathyHelper.registerChannelObserver("unity8");
3234 }
3335
34− color: Qt.rgba(0,0.8,0,1)
35− clip: true
36−
37− MouseArea {
36+ Rectangle {
37+ id: background
3838 anchors.fill: parent
39− onClicked: {
40− ApplicationManager.requestFocusApplication("dialer-app");
39+ color: callHint.color
40+
41+ states: [
42+ State {
43+ name: "fade-down"
44+ },
45+ State {
46+ name: "fade-up"
47+ PropertyChanges { target: background; color: callHint.colorFlash }
48+ }
49+ ]
50+ state: "fade-down"
51+
52+ transitions: [
53+ Transition {
54+ to: "fade-up";
55+ ColorAnimation { duration: 260; easing.type: Easing.InQuart }
56+ },
57+ Transition {
58+ to: "fade-down";
59+ ColorAnimation { duration: 150; easing.type: Easing.OutQuad }
60+ }
61+ ]
62+
63+ Timer {
64+ running: callHint.active && color != colorFlash
65+ interval: background.state == "fade-down" ? 3000 : 400
66+ repeat: true
67+ onTriggered: {
68+ if (background.state == "fade-down") {
69+ background.state = "fade-up";
70+ } else {
71+ background.state = "fade-down";
72+ }
73+ }
4174 }
4275 }
4376
@@ -109,6 +142,7 @@ Rectangle {
109142 right: time.left
110143 }
111144 height: columnHeight > callHint.height ? callHint.height : columnHeight
145+ clip: true
112146
113147 property Column column1
114148 property Column column2
@@ -117,6 +151,7 @@ Rectangle {
117151 delegate: contactColumnRow
118152 model: 2
119153 offset: 0
154+ interactive: false
120155
121156 path: Path {
122157 startY: -labelPathView.columnHeight / 2
@@ -131,7 +166,7 @@ Rectangle {
131166 id: offsetAnimation
132167 // ensure we go faster than the label switch
133168 duration: alternateLabelInterval / 2
134− velocity: 1.0
169+ velocity: 0.75
135170 easing.type: Easing.InOutQuad
136171 }
137172 }
@@ -139,12 +174,12 @@ Rectangle {
139174
140175 // Fade in text
141176 Rectangle {
142− anchors.fill: labelPathView
177+ anchors.fill: parent
143178 gradient: Gradient {
144− GradientStop { position: 0.0; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 1.0) }
145− GradientStop { position: 0.25; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 0.0) }
146− GradientStop { position: 0.75; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 0.0) }
147− GradientStop { position: 1.0; color: Qt.rgba(callHint.color.r, callHint.color.g, callHint.color.b, 1.0) }
179+ GradientStop { position: 0.0; color: background.color }
180+ GradientStop { position: 0.25; color: Qt.rgba(background.color.r, background.color.g, background.color.b, 0.0) }
181+ GradientStop { position: 0.75; color: Qt.rgba(background.color.r, background.color.g, background.color.b, 0.0) }
182+ GradientStop { position: 1.0; color: background.color }
148183 }
149184 }
150185
@@ -191,6 +226,13 @@ Rectangle {
191226 }
192227 }
193228
229+ MouseArea {
230+ anchors.fill: parent
231+ onClicked: {
232+ ApplicationManager.requestFocusApplication("dialer-app");
233+ }
234+ }
235+
194236 Telephony.ContactWatcher {
195237 id: _contactWatcher
196238 objectName: "contactWatcher"