on xenial help sign in
various fixes
1eb2938Nick Dedekind
qml/Panel/ActiveCallHint.qml+55−13
@@ -20,24 +20,57 @@ import Ubuntu.Components 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import "../Components"
21import "../Components"
22
22
23−Rectangle {
23+Item {
24 id: callHint
24 id: callHint
25
25
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)
29
31
30 Component.onCompleted: {
32 Component.onCompleted: {
31 telepathyHelper.registerChannelObserver("unity8");
33 telepathyHelper.registerChannelObserver("unity8");
32 }
34 }
33
35
34− color: Qt.rgba(0,0.8,0,1)
36+ Rectangle {
35− clip: true
37+ id: background
36−
37− MouseArea {
38 anchors.fill: parent
38 anchors.fill: parent
39− onClicked: {
39+ color: callHint.color
40− ApplicationManager.requestFocusApplication("dialer-app");
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+ }
41 }
74 }
42 }
75 }
43
76
@@ -109,6 +142,7 @@ Rectangle {
109 right: time.left
142 right: time.left
110 }
143 }
111 height: columnHeight > callHint.height ? callHint.height : columnHeight
144 height: columnHeight > callHint.height ? callHint.height : columnHeight
145+ clip: true
112
146
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
118 model: 2
152 model: 2
119 offset: 0
153 offset: 0
154+ interactive: false
120
155
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
136 }
171 }
137 }
172 }
@@ -139,12 +174,12 @@ Rectangle {
139
174
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 }
148 }
183 }
149 }
184 }
150
185
@@ -191,6 +226,13 @@ Rectangle {
191 }
226 }
192 }
227 }
193
228
229+ MouseArea {
230+ anchors.fill: parent
231+ onClicked: {
232+ ApplicationManager.requestFocusApplication("dialer-app");
233+ }
234+ }
235+
194 Telephony.ContactWatcher {
236 Telephony.ContactWatcher {
195 id: _contactWatcher
237 id: _contactWatcher
196 objectName: "contactWatcher"
238 objectName: "contactWatcher"
qml/Panel/Panel.qml+6−1
@@ -49,6 +49,11 @@ Item {
49 onShownChanged: hideTimer.stop()
49 onShownChanged: hideTimer.stop()
50 }
50 }
51
51
52+ PanelBackground {
53+ id: callHintBackground
54+ anchors.fill: callHint
55+ }
56+
52 ActiveCallHint {
57 ActiveCallHint {
53 id: callHint
58 id: callHint
54
59
@@ -103,7 +108,7 @@ Item {
103 anchors {
108 anchors {
104 left: parent.left
109 left: parent.left
105 right: parent.right
110 right: parent.right
106− top: panelBackground.bottom
111+ top: leftSeparatorLine.bottom
107 bottom: parent.bottom
112 bottom: parent.bottom
108 }
113 }
109 color: "black"
114 color: "black"