Merge lp:~boiko/dialer-app/fix_1226157 into lp:dialer-app

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 50
Merged at revision: 49
Proposed branch: lp:~boiko/dialer-app/fix_1226157
Merge into: lp:dialer-app
Diff against target: 355 lines (+57/-75)
12 files modified
src/dialerapplication.cpp (+13/-0)
src/qml/DialerPage/BackspaceButton.qml (+0/-32)
src/qml/DialerPage/CallButton.qml (+5/-6)
src/qml/DialerPage/CustomButton.qml (+7/-8)
src/qml/DialerPage/DialerPage.qml (+2/-1)
src/qml/DialerPage/Keypad.qml (+1/-1)
src/qml/DialerPage/KeypadButton.qml (+5/-3)
src/qml/HistoryPage/HistoryDelegate.qml (+7/-5)
src/qml/LiveCallPage/HangupButton.qml (+5/-5)
src/qml/LiveCallPage/LiveCall.qml (+9/-5)
src/qml/LiveCallPage/LiveCallKeypadButton.qml (+3/-4)
src/qml/assets/horizontal_divider@18.sci (+0/-5)
To merge this branch: bzr merge lp:~boiko/dialer-app/fix_1226157
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+188116@code.launchpad.net

Commit message

Update some icons to use the theme instead of the local assets. Also set the backspace icon to be white when there is text to erase.

Description of the change

Update some icons to use the theme instead of the local assets. Also set the backspace icon to be white when there is text to erase.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~boiko/dialer-app/fix_1226157 updated
50. By Gustavo Pichorim Boiko

Remove leftover debug print.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good.
tested on the device and it works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dialerapplication.cpp'
2--- src/dialerapplication.cpp 2013-07-30 20:42:29 +0000
3+++ src/dialerapplication.cpp 2013-09-30 13:32:01 +0000
4@@ -45,6 +45,18 @@
5 << "[-testability]";
6 }
7
8+//this is necessary to work on desktop
9+//On desktop use: export DIALER_APP_ICON_THEME=ubuntu-mobile
10+static void installIconPath()
11+{
12+ qDebug() << __PRETTY_FUNCTION__;
13+ QByteArray iconTheme = qgetenv("DIALER_APP_ICON_THEME");
14+ if (!iconTheme.isEmpty()) {
15+ QIcon::setThemeName(iconTheme);
16+ }
17+}
18+
19+
20 DialerApplication::DialerApplication(int &argc, char **argv)
21 : QGuiApplication(argc, argv), m_view(0), m_applicationIsReady(false)
22 {
23@@ -54,6 +66,7 @@
24
25 bool DialerApplication::setup()
26 {
27+ installIconPath();
28 static QList<QString> validSchemes;
29 bool fullScreen = false;
30
31
32=== removed file 'src/qml/DialerPage/BackspaceButton.qml'
33--- src/qml/DialerPage/BackspaceButton.qml 2013-07-24 19:12:57 +0000
34+++ src/qml/DialerPage/BackspaceButton.qml 1970-01-01 00:00:00 +0000
35@@ -1,32 +0,0 @@
36-/*
37- * Copyright 2012-2013 Canonical Ltd.
38- *
39- * This file is part of dialer-app.
40- *
41- * dialer-app is free software; you can redistribute it and/or modify
42- * it under the terms of the GNU General Public License as published by
43- * the Free Software Foundation; version 3.
44- *
45- * dialer-app is distributed in the hope that it will be useful,
46- * but WITHOUT ANY WARRANTY; without even the implied warranty of
47- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48- * GNU General Public License for more details.
49- *
50- * You should have received a copy of the GNU General Public License
51- * along with this program. If not, see <http://www.gnu.org/licenses/>.
52- */
53-
54-import QtQuick 2.0
55-import Ubuntu.Components 0.1
56-
57-Button {
58- width: units.gu(9)
59- height: units.gu(9)
60-
61- Image {
62- id: image
63- source: "../assets/keypad_backspace.png"
64- width: units.gu(3)
65- height: units.gu(2)
66- }
67-}
68
69=== modified file 'src/qml/DialerPage/CallButton.qml'
70--- src/qml/DialerPage/CallButton.qml 2013-08-28 00:27:02 +0000
71+++ src/qml/DialerPage/CallButton.qml 2013-09-30 13:32:01 +0000
72@@ -33,13 +33,12 @@
73
74 }
75
76- Image {
77+ Icon {
78 anchors.centerIn: parent
79- width: units.gu(3)
80- height: units.gu(3)
81- source: "../assets/dialer_call.png"
82- fillMode: Image.PreserveAspectFit
83+ width: units.gu(4)
84+ height: units.gu(4)
85+ name: "call-start"
86+ color: "white"
87 z: 1
88-
89 }
90 }
91
92=== modified file 'src/qml/DialerPage/CustomButton.qml'
93--- src/qml/DialerPage/CustomButton.qml 2013-08-28 00:27:02 +0000
94+++ src/qml/DialerPage/CustomButton.qml 2013-09-30 13:32:01 +0000
95@@ -22,16 +22,15 @@
96 Button {
97 // FIXME: waiting on #1072733
98 //iconSource: "../assets/dialer_call.png"
99- property string icon
100- property int iconWidth
101- property int iconHeight
102+ property alias icon: buttonIcon.name
103+ property alias iconWidth: buttonIcon.width
104+ property alias iconHeight: buttonIcon.height
105+ property bool lighten: false
106
107- Image {
108+ Icon {
109+ id: buttonIcon
110 anchors.centerIn: parent
111- width: iconWidth
112- height: iconHeight
113- source: icon
114- fillMode: Image.PreserveAspectFit
115+ color: lighten ? "white" : UbuntuColors.warmGrey
116 }
117 color: "transparent"
118 }
119
120=== modified file 'src/qml/DialerPage/DialerPage.qml'
121--- src/qml/DialerPage/DialerPage.qml 2013-09-26 19:50:53 +0000
122+++ src/qml/DialerPage/DialerPage.qml 2013-09-30 13:32:01 +0000
123@@ -185,7 +185,8 @@
124 anchors.leftMargin: units.gu(2)
125 width: units.gu(7)
126 height: units.gu(7)
127- icon: "../assets/erase.png"
128+ icon: "erase"
129+ lighten: input.text != ""
130 iconWidth: units.gu(3)
131 iconHeight: units.gu(3)
132
133
134=== modified file 'src/qml/DialerPage/Keypad.qml'
135--- src/qml/DialerPage/Keypad.qml 2013-08-28 00:27:02 +0000
136+++ src/qml/DialerPage/Keypad.qml 2013-09-30 13:32:01 +0000
137@@ -86,7 +86,7 @@
138 keycode: Qt.Key_1
139 onClicked: keypad.keyPressed(keycode, label)
140 onPressAndHold: mainView.callVoicemail()
141- iconSource: "../assets/voicemail.png"
142+ iconSource: "voicemail"
143 }
144
145 KeypadButton {
146
147=== modified file 'src/qml/DialerPage/KeypadButton.qml'
148--- src/qml/DialerPage/KeypadButton.qml 2013-08-28 00:27:02 +0000
149+++ src/qml/DialerPage/KeypadButton.qml 2013-09-30 13:32:01 +0000
150@@ -28,7 +28,7 @@
151 property alias label: labelItem.text
152 property alias sublabel: sublabelItem.text
153 property alias sublabelSize: sublabelItem.fontSize
154- property alias iconSource: subImage.source
155+ property alias iconSource: subImage.name
156 property int keycode
157 property bool isCorner: false
158 property int corner
159@@ -72,13 +72,15 @@
160 color: "#888888"
161 }
162
163- Image {
164+ Icon {
165 id: subImage
166- visible: source != ""
167+ visible: name != ""
168 anchors.top: labelItem.bottom
169 anchors.horizontalCenter: parent.horizontalCenter
170 anchors.topMargin: units.dp(1.5)
171 opacity: 0.8
172+ width: units.gu(2)
173+ height: units.gu(2)
174 }
175 }
176 }
177
178=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
179--- src/qml/HistoryPage/HistoryDelegate.qml 2013-09-24 19:10:26 +0000
180+++ src/qml/HistoryPage/HistoryDelegate.qml 2013-09-30 13:32:01 +0000
181@@ -57,11 +57,11 @@
182
183 function selectIcon() {
184 if (model.callMissed) {
185- return "../assets/missed-call.png";
186+ return "missed-call";
187 } else if (incoming) {
188- return "../assets/incoming-call.png";
189+ return "incoming-call";
190 } else {
191- return "../assets/outgoing-call.png";
192+ return "outgoing-call";
193 }
194 }
195
196@@ -208,11 +208,13 @@
197 }
198 }
199
200- Image {
201+ Icon {
202 id: phoneIcon
203 anchors.right: parent.right
204 anchors.rightMargin: units.gu(3)
205 anchors.verticalCenter: parent.verticalCenter
206- source: selectIcon()
207+ width: units.gu(2)
208+ height: units.gu(2)
209+ name: selectIcon()
210 }
211 }
212
213=== modified file 'src/qml/LiveCallPage/HangupButton.qml'
214--- src/qml/LiveCallPage/HangupButton.qml 2013-08-28 00:27:02 +0000
215+++ src/qml/LiveCallPage/HangupButton.qml 2013-09-30 13:32:01 +0000
216@@ -34,12 +34,12 @@
217 radius: "medium"
218 }
219
220- Image {
221+ Icon {
222 anchors.centerIn: parent
223- width: units.gu(6)
224- height: units.gu(6)
225- source: "../assets/incall_hangup.png"
226- fillMode: Image.PreserveAspectFit
227+ width: units.gu(4)
228+ height: units.gu(4)
229+ name: "call-end"
230+ color: "white"
231 z: 1
232 }
233 }
234
235=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
236--- src/qml/LiveCallPage/LiveCall.qml 2013-09-26 21:39:16 +0000
237+++ src/qml/LiveCallPage/LiveCall.qml 2013-09-30 13:32:01 +0000
238@@ -270,7 +270,7 @@
239
240 LiveCallKeypadButton {
241 objectName: "muteButton"
242- iconSource: selected ? "../assets/microphone-mute.png" : "../assets/microphone.png"
243+ iconSource: selected ? "microphone-mute" : "microphone"
244 selected: liveCall.isMuted
245 iconWidth: units.gu(3)
246 iconHeight: units.gu(3)
247@@ -283,7 +283,7 @@
248
249 LiveCallKeypadButton {
250 objectName: "pauseStartButton"
251- iconSource: selected ? "../assets/play.png" : "../assets/pause.png"
252+ iconSource: selected ? "media-playback-start" : "media-playback-pause"
253 selected: liveCall.onHold
254 iconWidth: units.gu(3)
255 iconHeight: units.gu(3)
256@@ -296,7 +296,7 @@
257
258 LiveCallKeypadButton {
259 objectName: "speakerButton"
260- iconSource: selected ? "../assets/speaker.png" : "../assets/speaker-mute.png"
261+ iconSource: selected ? "speaker" : "speaker-mute"
262 selected: liveCall.isSpeaker
263 iconWidth: units.gu(3)
264 iconHeight: units.gu(3)
265@@ -319,7 +319,9 @@
266 LiveCallKeypadButton {
267 id: contactButton
268 objectName: "contactButton"
269- iconSource: "../assets/avatar-default.png"
270+ iconSource: "contact"
271+ iconWidth: units.gu(4)
272+ iconHeight: units.gu(4)
273
274 anchors {
275 verticalCenter: hangupButton.verticalCenter
276@@ -339,7 +341,9 @@
277 LiveCallKeypadButton {
278 id: dtmfButton
279 objectName: "dtmfButton"
280- iconSource: "../assets/keypad.png"
281+ iconSource: "keypad"
282+ iconWidth: units.gu(4)
283+ iconHeight: units.gu(4)
284
285 anchors {
286 verticalCenter: hangupButton.verticalCenter
287
288=== modified file 'src/qml/LiveCallPage/LiveCallKeypadButton.qml'
289--- src/qml/LiveCallPage/LiveCallKeypadButton.qml 2013-08-28 00:27:02 +0000
290+++ src/qml/LiveCallPage/LiveCallKeypadButton.qml 2013-09-30 13:32:01 +0000
291@@ -22,7 +22,7 @@
292 AbstractButton {
293 id: button
294
295- property alias iconSource: icon.source
296+ property alias iconSource: icon.name
297 property bool selected: false
298
299 width: units.gu(7)
300@@ -36,12 +36,11 @@
301 source: (selected || pressed) ? "../assets/dialer_pad_bg_pressed.png" : "../assets/dialer_pad_bg.png"
302 }*/
303
304- Image {
305+ Icon {
306 id: icon
307 anchors.centerIn: parent
308 width: (iconWidth > 0) ? iconWidth : undefined
309 height: (iconHeight > 0) ? iconHeight : undefined
310- source: icon
311- fillMode: Image.PreserveAspectFit
312+ color: "white"
313 }
314 }
315
316=== removed file 'src/qml/assets/back@18.png'
317Binary files src/qml/assets/back@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/back@18.png 1970-01-01 00:00:00 +0000 differ
318=== removed file 'src/qml/assets/dialer_call.png'
319Binary files src/qml/assets/dialer_call.png 2013-07-23 21:11:05 +0000 and src/qml/assets/dialer_call.png 1970-01-01 00:00:00 +0000 differ
320=== removed file 'src/qml/assets/erase@18.png'
321Binary files src/qml/assets/erase@18.png 2013-07-23 21:11:05 +0000 and src/qml/assets/erase@18.png 1970-01-01 00:00:00 +0000 differ
322=== removed file 'src/qml/assets/horizontal_divider@18.png'
323Binary files src/qml/assets/horizontal_divider@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/horizontal_divider@18.png 1970-01-01 00:00:00 +0000 differ
324=== removed file 'src/qml/assets/horizontal_divider@18.sci'
325--- src/qml/assets/horizontal_divider@18.sci 2013-07-24 19:12:47 +0000
326+++ src/qml/assets/horizontal_divider@18.sci 1970-01-01 00:00:00 +0000
327@@ -1,5 +0,0 @@
328-border.top: 2
329-border.bottom: 2
330-border.left: 0
331-border.right: 0
332-source: horizontal_divider@18.png
333
334=== removed file 'src/qml/assets/incoming-call@18.png'
335Binary files src/qml/assets/incoming-call@18.png 2013-07-23 21:11:05 +0000 and src/qml/assets/incoming-call@18.png 1970-01-01 00:00:00 +0000 differ
336=== removed file 'src/qml/assets/keypad@18.png'
337Binary files src/qml/assets/keypad@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/keypad@18.png 1970-01-01 00:00:00 +0000 differ
338=== removed file 'src/qml/assets/live_call_contacts@18.png'
339Binary files src/qml/assets/live_call_contacts@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/live_call_contacts@18.png 1970-01-01 00:00:00 +0000 differ
340=== removed file 'src/qml/assets/microphone-mute@18.png'
341Binary files src/qml/assets/microphone-mute@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/microphone-mute@18.png 1970-01-01 00:00:00 +0000 differ
342=== removed file 'src/qml/assets/microphone@18.png'
343Binary files src/qml/assets/microphone@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/microphone@18.png 1970-01-01 00:00:00 +0000 differ
344=== removed file 'src/qml/assets/missed-call@18.png'
345Binary files src/qml/assets/missed-call@18.png 2013-07-23 21:11:05 +0000 and src/qml/assets/missed-call@18.png 1970-01-01 00:00:00 +0000 differ
346=== removed file 'src/qml/assets/outgoing-call@18.png'
347Binary files src/qml/assets/outgoing-call@18.png 2013-07-23 21:11:05 +0000 and src/qml/assets/outgoing-call@18.png 1970-01-01 00:00:00 +0000 differ
348=== removed file 'src/qml/assets/pause@18.png'
349Binary files src/qml/assets/pause@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/pause@18.png 1970-01-01 00:00:00 +0000 differ
350=== removed file 'src/qml/assets/play@18.png'
351Binary files src/qml/assets/play@18.png 2013-07-31 21:22:00 +0000 and src/qml/assets/play@18.png 1970-01-01 00:00:00 +0000 differ
352=== removed file 'src/qml/assets/quick-add@18.png'
353Binary files src/qml/assets/quick-add@18.png 2013-07-24 19:12:47 +0000 and src/qml/assets/quick-add@18.png 1970-01-01 00:00:00 +0000 differ
354=== removed file 'src/qml/assets/voicemail@18.png'
355Binary files src/qml/assets/voicemail@18.png 2013-08-28 00:27:02 +0000 and src/qml/assets/voicemail@18.png 1970-01-01 00:00:00 +0000 differ

Subscribers

People subscribed via source and target branches