Merge lp:~phablet-team/dialer-app/rtm-fit-finish into lp:dialer-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 220
Merged at revision: 211
Proposed branch: lp:~phablet-team/dialer-app/rtm-fit-finish
Merge into: lp:dialer-app
Diff against target: 1918 lines (+470/-902)
21 files modified
src/qml/ContactsPage/ContactsPage.qml (+3/-2)
src/qml/DialerPage/CallButton.qml (+11/-3)
src/qml/DialerPage/CustomButton.qml (+2/-3)
src/qml/DialerPage/DialerPage.qml (+218/-221)
src/qml/DialerPage/Keypad.qml (+4/-2)
src/qml/DialerPage/KeypadButton.qml (+15/-15)
src/qml/DialerPage/KeypadEntry.qml (+41/-42)
src/qml/HistoryPage/ExpandableButton.qml (+1/-1)
src/qml/HistoryPage/HistoryDelegate.qml (+99/-102)
src/qml/HistoryPage/HistoryPage.qml (+34/-32)
src/qml/HistoryPage/Timeline.qml (+1/-1)
src/qml/LiveCallPage/ConferenceCallDisplay.qml (+1/-1)
src/qml/LiveCallPage/HangupButton.qml (+1/-1)
src/qml/LiveCallPage/LiveCall.qml (+27/-35)
src/qml/LiveCallPage/LiveCallKeypadButton.qml (+1/-1)
src/qml/LiveCallPage/MultiCallDisplay.qml (+1/-1)
src/qml/LiveCallPage/StopWatch.qml (+1/-1)
src/qml/PageWithBottomEdge.qml (+0/-434)
src/qml/dialer-app.qml (+7/-2)
tests/autopilot/dialer_app/emulators.py (+1/-1)
tests/autopilot/dialer_app/tests/test_calls.py (+1/-1)
To merge this branch: bzr merge lp:~phablet-team/dialer-app/rtm-fit-finish
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Tiago Salem Herrmann (community) Approve
Review via email: mp+228530@code.launchpad.net

Commit message

- Visual update
- Update import to use Ubuntu.Components 1.1
- Updated HistoryDelegate with new ListItemWithActions visuals.
- Replaced local implementation of PageWithBottomEdge with Ubuntu.Contacts implementation.
- Used new SDK header API.

Description of the change

Visual update

== Checklist ==
Are there any related MPs required for this MP to build/function as expected? Please list.
Yes: https://code.launchpad.net/~phablet-team/address-book-app/rtm-fit-finish/+merge/228529

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/dialer-app) on device or emulator?
Yes

If you changed the UI, was the change specified/approved by design?
Yes

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
203. By Renato Araujo Oliveira Filho

Updated HistoryDelegate with new ListItemWithActions visuals.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
204. By Renato Araujo Oliveira Filho

Fixed sim selector.

205. By Renato Araujo Oliveira Filho

Fixed typo.

206. By Renato Araujo Oliveira Filho

Fixed header sections visual when empty.

207. By Renato Araujo Oliveira Filho

Replaced local implementation of PageWithBottomEdge with Ubuntu.Contacts implementation.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
208. By Renato Araujo Oliveira Filho

Fixed live call keypad position.

209. By Renato Araujo Oliveira Filho

Remove 20 digits limit from KeypadEntry;

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
210. By Renato Araujo Oliveira Filho

Move RecentListView back to beginner after close it.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
211. By Renato Araujo Oliveira Filho

Fixed KeypadEntry alingment when there the content width is bigger then the item width.

212. By Renato Araujo Oliveira Filho

HistoryPage header update to new SDK API.

213. By Renato Araujo Oliveira Filho

Fixed multiselection visuals.

214. By Renato Araujo Oliveira Filho

Trunk merged.

215. By Renato Araujo Oliveira Filho

Parent merged.

216. By Gustavo Pichorim Boiko

Fix the account usage in QML.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
217. By Gustavo Pichorim Boiko

Fix finding the account index.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
218. By Renato Araujo Oliveira Filho

Implemented support to add a new contact from contact page.

219. By Gustavo Pichorim Boiko

Fix autopilot tests.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
220. By Gustavo Pichorim Boiko

Remove wrong line.

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
No, it depends on other branches.

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/ContactsPage/ContactsPage.qml'
2--- src/qml/ContactsPage/ContactsPage.qml 2014-07-25 14:16:22 +0000
3+++ src/qml/ContactsPage/ContactsPage.qml 2014-08-04 18:47:59 +0000
4@@ -17,7 +17,7 @@
5 */
6
7 import QtQuick 2.0
8-import Ubuntu.Components 0.1
9+import Ubuntu.Components 1.1
10 import Ubuntu.Components.ListItems 0.1 as ListItem
11 import Ubuntu.Components.Popups 0.1
12 import Ubuntu.Contacts 0.1
13@@ -43,7 +43,7 @@
14 }
15 onTextChanged: contactList.currentIndex = -1
16 inputMethodHints: Qt.ImhNoPredictiveText
17- placeholderText: i18n.tr("Type a name or phone to search")
18+ placeholderText: i18n.tr("Search...")
19 }
20
21 // background
22@@ -78,6 +78,7 @@
23 mainView.populateDialpad(detail.number)
24 }
25 }
26+ onAddDetailClicked: mainView.addPhoneToContact(contact.contactId, " ")
27 }
28
29 KeyboardRectagle {
30
31=== modified file 'src/qml/DialerPage/CallButton.qml'
32--- src/qml/DialerPage/CallButton.qml 2014-05-23 08:30:55 +0000
33+++ src/qml/DialerPage/CallButton.qml 2014-08-04 18:47:59 +0000
34@@ -17,22 +17,30 @@
35 */
36
37 import QtQuick 2.0
38-import Ubuntu.Components 0.1
39+import Ubuntu.Components 1.1
40
41 AbstractButton {
42 id: button
43+
44+ readonly property string defaultColor: "#0F8B21"
45+ property alias iconRotation: icon.rotation
46+ property alias color: shape.color
47+
48 width: units.gu(21)
49 height: units.gu(4.5)
50 opacity: button.pressed ? 0.5 : (enabled ? 1 : 0.2)
51
52 UbuntuShape {
53+ id: shape
54+
55 anchors.fill: parent
56- color: "#0F8B21"
57- gradientColor: "#37B349"
58+ color: defaultColor
59 radius: "medium"
60 }
61
62 Icon {
63+ id: icon
64+
65 anchors.centerIn: parent
66 width: units.gu(3)
67 height: units.gu(3)
68
69=== modified file 'src/qml/DialerPage/CustomButton.qml'
70--- src/qml/DialerPage/CustomButton.qml 2014-05-21 07:25:47 +0000
71+++ src/qml/DialerPage/CustomButton.qml 2014-08-04 18:47:59 +0000
72@@ -17,18 +17,17 @@
73 */
74
75 import QtQuick 2.0
76-import Ubuntu.Components 0.1
77+import Ubuntu.Components 1.1
78
79 Button {
80 property alias icon: buttonIcon.name
81 property alias iconWidth: buttonIcon.width
82 property alias iconHeight: buttonIcon.height
83- property bool lighten: false
84
85 Icon {
86 id: buttonIcon
87 anchors.centerIn: parent
88- color: lighten ? "white" : UbuntuColors.warmGrey
89+ color: UbuntuColors.darkGrey
90 }
91 color: "transparent"
92 }
93
94=== modified file 'src/qml/DialerPage/DialerPage.qml'
95--- src/qml/DialerPage/DialerPage.qml 2014-07-30 17:55:22 +0000
96+++ src/qml/DialerPage/DialerPage.qml 2014-08-04 18:47:59 +0000
97@@ -18,35 +18,34 @@
98
99 import QtContacts 5.0
100 import QtQuick 2.0
101-import Ubuntu.Components 0.1
102+import Ubuntu.Components 1.1
103 import Ubuntu.Components.Popups 0.1
104 import Ubuntu.Telephony 0.1
105+import Ubuntu.Contacts 0.1
106 import Ubuntu.Components.ListItems 0.1 as ListItems
107+
108 import "../"
109
110 PageWithBottomEdge {
111 id: page
112+
113 property alias dialNumber: keypadEntry.value
114 property alias input: keypadEntry.input
115 property bool multipleAccounts: telepathyHelper.accountIds.length > 1
116 objectName: "dialerPage"
117
118- tools: ToolbarItems {
119- ToolbarButton {
120- id: contactButton
121- objectName: "contactButton"
122- action: Action {
123- iconSource: "image://theme/contact"
124- text: i18n.tr("Contacts")
125- onTriggered: pageStack.push(Qt.resolvedUrl("../ContactsPage/ContactsPage.qml"))
126- }
127+ head.actions: [
128+ Action {
129+ iconName: "contact"
130+ text: i18n.tr("Contacts")
131+ onTriggered: pageStack.push(Qt.resolvedUrl("../ContactsPage/ContactsPage.qml"))
132+ },
133+ Action {
134+ iconName: "settings"
135+ text: i18n.tr("Settings")
136+ onTriggered: Qt.openUrlExternally("settings:///system/phone")
137 }
138- }
139-
140- ToolbarItems {
141- id: emptyToolbar
142- visible: false
143- }
144+ ]
145
146 title: i18n.tr("Keypad")
147
148@@ -57,8 +56,8 @@
149 when: greeter.greeterActive
150
151 PropertyChanges {
152- target: page
153- tools: emptyToolbar
154+ target: page.head
155+ actions: []
156 }
157 PropertyChanges {
158 target: contactLabel
159@@ -98,13 +97,15 @@
160 }
161
162 onIsReadyChanged: {
163- bottomEdgePage.fullView = isReady;
164+ if (bottomEdgePage) {
165+ bottomEdgePage.fullView = isReady
166+ }
167 }
168
169 onDialNumberChanged: {
170 if(checkUSSD(dialNumber)) {
171 // check for custom strings
172- if (dialNumber == "*#06#") {
173+ if (dialNumber === "*#06#") {
174 dialNumber = ""
175 mainView.ussdResponseTitle = "IMEI"
176 mainView.ussdResponseText = ussdManager.serial(mainView.account.accountId)
177@@ -113,6 +114,17 @@
178 }
179 }
180
181+ function accountIndex(account) {
182+ var index = -1;
183+ for (var i in telepathyHelper.accounts) {
184+ if (telepathyHelper.accounts[i] == account) {
185+ index = i;
186+ break;
187+ }
188+ }
189+ return index;
190+ }
191+
192 Connections {
193 target: mainView
194 onPendingNumberToDialChanged: {
195@@ -121,6 +133,34 @@
196 mainView.switchToKeypadView();
197 }
198 }
199+ onAccountChanged: {
200+ var newAccountIndex = accountIndex(account);
201+ if (newAccountIndex >= 0 && newAccountIndex !== page.head.sections.selectedIndex) {
202+ page.head.sections.selectedIndex = newAccountIndex
203+ }
204+ }
205+ }
206+
207+ head.sections.model: {
208+ // does not show dual sim switch if there is only one sim
209+ if (!multipleAccounts) {
210+ return undefined
211+ }
212+
213+ var accountNames = []
214+ for(var i=0; i < telepathyHelper.accounts.length; i++) {
215+ accountNames.push(telepathyHelper.accounts[i].displayName)
216+ }
217+ return accountNames
218+ }
219+
220+ // Account switcher
221+ head.sections.selectedIndex: Math.max(0, accountIndex(mainView.account))
222+ Connections {
223+ target: page.head.sections
224+ onSelectedIndexChanged: {
225+ mainView.account = telepathyHelper.accounts[page.head.sections.selectedIndex]
226+ }
227 }
228
229 FocusScope {
230@@ -129,168 +169,90 @@
231 anchors.fill: parent
232 focus: true
233
234- // TODO replace by the sdk sections component when it's released
235- Rectangle {
236- id: accountList
237+ Item {
238+ id: entryWithButtons
239+
240 anchors {
241- left: parent.left
242- right: parent.right
243 top: parent.top
244- }
245- clip: !multipleAccounts
246- height: multipleAccounts ? childrenRect.height : 0
247- z: 1
248- color: "white"
249- Row {
250+ left: parent.left
251+ right: parent.right
252+ }
253+ height: units.gu(10)
254+
255+ CustomButton {
256+ id: addContact
257+
258+ anchors {
259+ left: parent.left
260+ leftMargin: units.gu(2)
261+ verticalCenter: parent.verticalCenter
262+ }
263+ width: units.gu(3)
264+ height: (keypadEntry.value !== "" && contactWatcher.isUnknown) ? units.gu(3) : 0
265+ icon: "contact-new"
266+ iconWidth: units.gu(3)
267+ iconHeight: units.gu(3)
268+ opacity: (keypadEntry.value !== "" && contactWatcher.isUnknown) ? 1.0 : 0.0
269+
270+ Behavior on opacity {
271+ UbuntuNumberAnimation { }
272+ }
273+
274+ Behavior on width {
275+ UbuntuNumberAnimation { }
276+ }
277+
278+ onClicked: mainView.addNewPhone(keypadEntry.value)
279+ }
280+
281+ KeypadEntry {
282+ id: keypadEntry
283+
284 anchors {
285 top: parent.top
286- horizontalCenter: parent.horizontalCenter
287- }
288- height: childrenRect.height
289- width: childrenRect.width
290- spacing: units.gu(2)
291- Repeater {
292- model: telepathyHelper.accounts
293- delegate: Label {
294- width: paintedWidth
295- height: paintedHeight
296- text: model.displayName
297- font.pixelSize: FontUtils.sizeToPixels("small")
298- color: mainView.account == modelData ? "red" : "#5d5d5d"
299- MouseArea {
300- anchors {
301- fill: parent
302- // increase touch area
303- leftMargin: units.gu(-1)
304- rightMargin: units.gu(-1)
305- bottomMargin: units.gu(-1)
306- topMargin: units.gu(-1)
307- }
308- onClicked: mainView.account = modelData
309- z: 2
310- }
311- }
312- }
313- }
314- }
315-
316- KeypadEntry {
317- id: keypadEntry
318-
319- anchors {
320- top: accountList.bottom
321- topMargin: units.gu(3)
322- left: parent.left
323- right: backspace.left
324- }
325-
326- focus: true
327- placeHolder: i18n.tr("Enter a number")
328- Keys.forwardTo: [callButton]
329- value: mainView.pendingNumberToDial
330- }
331-
332- CustomButton {
333- id: backspace
334- objectName: "eraseButton"
335- anchors {
336- right: parent.right
337- rightMargin: units.gu(2)
338- verticalCenter: keypadEntry.verticalCenter
339- }
340- width: input.text !== "" ? units.gu(3) : 0
341- height: units.gu(3)
342- icon: "erase"
343- iconWidth: units.gu(3)
344- iconHeight: units.gu(3)
345- opacity: input.text !== "" ? 1 : 0
346-
347- Behavior on opacity {
348- UbuntuNumberAnimation { }
349- }
350-
351- Behavior on width {
352- UbuntuNumberAnimation { }
353- }
354-
355- onPressAndHold: input.text = ""
356-
357- onClicked: {
358- if (input.cursorPosition > 0) {
359- input.remove(input.cursorPosition, input.cursorPosition - 1)
360- }
361- }
362- }
363-
364- /*ContactSearchListView {
365- id: contactSearch
366- property string searchTerm: keypadEntry.value != "" ? keypadEntry.value : "some value that won't match"
367- anchors {
368- left: parent.left
369- right: parent.right
370- bottom: keypadEntryBackground.bottom
371- margins: units.gu(0.5)
372- }
373-
374- states: [
375- State {
376- name: "empty"
377- when: contactSearch.count == 0
378- PropertyChanges {
379- target: contactSearch
380- height: 0
381- }
382- }
383- ]
384-
385- Behavior on height {
386- UbuntuNumberAnimation { }
387- }
388-
389- filter: UnionFilter {
390- DetailFilter {
391- detail: ContactDetail.Name
392- field: Name.FirstName
393- value: contactSearch.searchTerm
394- matchFlags: DetailFilter.MatchKeypadCollation | DetailFilter.MatchContains
395- }
396-
397- DetailFilter {
398- detail: ContactDetail.Name
399- field: Name.LastName
400- value: contactSearch.searchTerm
401- matchFlags: DetailFilter.MatchContains | DetailFilter.MatchKeypadCollation
402- }
403-
404- DetailFilter {
405- detail: ContactDetail.PhoneNumber
406- field: PhoneNumber.Number
407- value: contactSearch.searchTerm
408- matchFlags: DetailFilter.MatchPhoneNumber
409- }
410-
411- DetailFilter {
412- detail: ContactDetail.PhoneNumber
413- field: PhoneNumber.Number
414- value: contactSearch.searchTerm
415- matchFlags: DetailFilter.MatchContains
416- }
417-
418- }
419-
420- // FIXME: uncomment this code if we end up having both the header and the toolbar.
421- onCountChanged: {
422- if (count > 0) {
423- page.header.hide();
424- } else {
425- page.header.show();
426- }
427- }
428-
429- onDetailClicked: {
430- mainView.call(detail.number);
431- }
432- }*/
433+ topMargin: units.gu(3)
434+ left: addContact.right
435+ right: backspace.left
436+ }
437+ height: units.gu(4)
438+ focus: true
439+ placeHolder: i18n.tr("Enter a number")
440+ Keys.forwardTo: [callButton]
441+ value: mainView.pendingNumberToDial
442+ }
443+
444+ CustomButton {
445+ id: backspace
446+ objectName: "eraseButton"
447+ anchors {
448+ right: parent.right
449+ rightMargin: units.gu(2)
450+ verticalCenter: parent.verticalCenter
451+ }
452+ width: units.gu(3)
453+ height: input.text !== "" ? units.gu(3) : 0
454+ icon: "erase"
455+ iconWidth: units.gu(3)
456+ iconHeight: units.gu(3)
457+ opacity: input.text !== "" ? 1 : 0
458+
459+ Behavior on opacity {
460+ UbuntuNumberAnimation { }
461+ }
462+
463+ Behavior on width {
464+ UbuntuNumberAnimation { }
465+ }
466+
467+ onPressAndHold: input.text = ""
468+
469+ onClicked: {
470+ if (input.cursorPosition > 0) {
471+ input.remove(input.cursorPosition, input.cursorPosition - 1)
472+ }
473+ }
474+ }
475+ }
476
477 ListItems.ThinDivider {
478 id: divider
479@@ -300,8 +262,7 @@
480 leftMargin: units.gu(2)
481 right: parent.right
482 rightMargin: units.gu(2)
483- top: keypadEntry.bottom
484- topMargin: units.gu(4)
485+ top: entryWithButtons.bottom
486 }
487 }
488
489@@ -314,12 +275,13 @@
490 id: contactLabel
491 anchors {
492 horizontalCenter: divider.horizontalCenter
493- bottom: divider.top
494+ bottom: entryWithButtons.bottom
495 bottomMargin: units.gu(1)
496 }
497 text: contactWatcher.isUnknown ? "" : contactWatcher.alias
498 color: UbuntuColors.lightAubergine
499 opacity: text != "" ? 1 : 0
500+ fontSize: "small"
501 Behavior on opacity {
502 UbuntuNumberAnimation { }
503 }
504@@ -329,8 +291,8 @@
505 id: keypad
506
507 anchors {
508- bottom: footer.top
509- bottomMargin: units.gu(3)
510+ top: divider.bottom
511+ topMargin: units.gu(2)
512 horizontalCenter: parent.horizontalCenter
513 }
514
515@@ -338,44 +300,79 @@
516 input.insert(input.cursorPosition, label)
517 }
518 }
519-
520- Item {
521- id: footer
522-
523- anchors.left: parent.left
524- anchors.right: parent.right
525- anchors.bottom: parent.bottom
526- height: units.gu(10)
527-
528- CallButton {
529- id: callButton
530- objectName: "callButton"
531- anchors.bottom: footer.bottom
532- anchors.bottomMargin: units.gu(5)
533- anchors.horizontalCenter: parent.horizontalCenter
534- onClicked: {
535- console.log("Starting a call to " + keypadEntry.value);
536- // avoid cleaning the keypadEntry in case there is no signal
537- if (!mainView.account.connected) {
538- PopupUtils.open(noNetworkDialog)
539- return
540- }
541- mainView.call(keypadEntry.value, mainView.account.accountId);
542- keypadEntry.value = "";
543- }
544- enabled: {
545- if (dialNumber == "") {
546- return false;
547- }
548-
549- if (greeter.greeterActive) {
550- return mainView.isEmergencyNumber(dialNumber);
551- }
552-
553- return true;
554- }
555- }
556-
557+ }
558+ Item {
559+ id: footer
560+
561+ anchors {
562+ left: parent.left
563+ right: parent.right
564+ bottom: parent.bottom
565+ }
566+ height: units.gu(10)
567+
568+ CallButton {
569+ id: callButton
570+ objectName: "callButton"
571+ anchors {
572+ bottom: footer.bottom
573+ bottomMargin: units.gu(5)
574+ horizontalCenter: parent.horizontalCenter
575+ }
576+ onClicked: {
577+ console.log("Starting a call to " + keypadEntry.value);
578+ // avoid cleaning the keypadEntry in case there is no signal
579+ if (!mainView.account.connected) {
580+ PopupUtils.open(noNetworkDialog)
581+ return
582+ }
583+ callAnimation.start()
584+ }
585+ enabled: {
586+ if (dialNumber == "") {
587+ return false;
588+ }
589+
590+ if (greeter.greeterActive) {
591+ return mainView.isEmergencyNumber(dialNumber);
592+ }
593+
594+ return true;
595+ }
596+ }
597+ }
598+
599+ SequentialAnimation {
600+ id: callAnimation
601+
602+ PropertyAction {
603+ target: callButton
604+ property: "color"
605+ value: "red"
606+ }
607+
608+ ParallelAnimation {
609+ UbuntuNumberAnimation {
610+ target: keypadContainer
611+ property: "opacity"
612+ to: 0.0
613+ duration: UbuntuAnimation.SlowDuration
614+ }
615+ UbuntuNumberAnimation {
616+ target: callButton
617+ property: "iconRotation"
618+ to: -90.0
619+ duration: UbuntuAnimation.SlowDuration
620+ }
621+ }
622+ ScriptAction {
623+ script: {
624+ mainView.call(keypadEntry.value, mainView.account.accountId);
625+ keypadEntry.value = ""
626+ callButton.iconRotation = 0.0
627+ keypadContainer.opacity = 1.0
628+ callButton.color = callButton.defaultColor
629+ }
630 }
631 }
632 }
633
634=== modified file 'src/qml/DialerPage/Keypad.qml'
635--- src/qml/DialerPage/Keypad.qml 2014-05-23 08:30:55 +0000
636+++ src/qml/DialerPage/Keypad.qml 2014-08-04 18:47:59 +0000
637@@ -17,13 +17,13 @@
638 */
639
640 import QtQuick 2.0
641-import Ubuntu.Components 0.1
642+import Ubuntu.Components 1.1
643 import Ubuntu.Components.ListItems 0.1 as ListItems
644
645 Item {
646 id: keypad
647
648- property int keysWidth: units.gu(13)
649+ property int keysWidth: units.gu(11)
650 property int keysHeight: units.gu(8)
651
652 width: keys.width
653@@ -36,6 +36,8 @@
654
655 rows: 4
656 columns: 3
657+ columnSpacing: units.gu(2.0)
658+ rowSpacing: units.gu(0.5)
659 anchors.centerIn: parent
660
661 KeypadButton {
662
663=== modified file 'src/qml/DialerPage/KeypadButton.qml'
664--- src/qml/DialerPage/KeypadButton.qml 2014-06-10 17:29:13 +0000
665+++ src/qml/DialerPage/KeypadButton.qml 2014-08-04 18:47:59 +0000
666@@ -17,7 +17,7 @@
667 */
668
669 import QtQuick 2.0
670-import Ubuntu.Components 0.1
671+import Ubuntu.Components 1.1
672
673 AbstractButton {
674 id: button
675@@ -33,6 +33,17 @@
676 property bool isCorner: false
677 property int corner
678
679+ UbuntuShape {
680+ anchors.fill: parent
681+ opacity: button.pressed ? 1 : 0
682+
683+ Behavior on opacity {
684+ UbuntuNumberAnimation {
685+ duration: UbuntuAnimation.BriskDuration
686+ }
687+ }
688+ }
689+
690 Item {
691 height: childrenRect.height
692 width: parent.width
693@@ -46,18 +57,6 @@
694 }
695 }
696
697- Rectangle {
698- anchors.fill: parent
699- color: Qt.rgba(0, 0, 0, 0.15)
700- opacity: button.pressed ? 1 : 0
701-
702- Behavior on opacity {
703- UbuntuNumberAnimation {
704- duration: UbuntuAnimation.BriskDuration
705- }
706- }
707- }
708-
709 Label {
710 id: labelItem
711
712@@ -65,10 +64,10 @@
713 anchors.horizontalCenter: parent.horizontalCenter
714 anchors.verticalCenterOffset: -units.gu(0.5)
715 horizontalAlignment: Text.AlignHCenter
716- fontSize: "large"
717 height: paintedHeight
718- font.weight: Font.DemiBold
719+ font.pixelSize: units.dp(30)
720 verticalAlignment: Text.AlignTop
721+ color: UbuntuColors.darkGrey
722 }
723
724 Label {
725@@ -79,6 +78,7 @@
726 anchors.horizontalCenter: parent.horizontalCenter
727 horizontalAlignment: Text.AlignHCenter
728 fontSize: "x-small"
729+ color: UbuntuColors.darkGrey
730 }
731
732 Icon {
733
734=== modified file 'src/qml/DialerPage/KeypadEntry.qml'
735--- src/qml/DialerPage/KeypadEntry.qml 2014-07-14 23:17:06 +0000
736+++ src/qml/DialerPage/KeypadEntry.qml 2014-08-04 18:47:59 +0000
737@@ -17,7 +17,7 @@
738 */
739
740 import QtQuick 2.0
741-import Ubuntu.Components 0.1
742+import Ubuntu.Components 1.1
743 import Ubuntu.Components.ListItems 0.1 as ListItems
744 import Ubuntu.Telephony.PhoneNumber 0.1
745
746@@ -29,28 +29,48 @@
747 property alias placeHolder: hint.text
748 property alias placeHolderPixelFontSize: hint.font.pixelSize
749
750- height: input.height
751
752 PhoneNumberInput {
753 id: input
754
755 property bool __adjusting: false
756-
757- anchors.left: parent.left
758- anchors.leftMargin: units.gu(2)
759- anchors.right: parent.right
760- anchors.rightMargin: units.gu(2)
761- anchors.verticalCenter: parent.verticalCenter
762- horizontalAlignment: TextInput.AlignHCenter
763- font.pixelSize: units.dp(39)
764- font.weight: Font.Light
765+ readonly property double maximumFontSize: units.dp(30)
766+ readonly property double minimumFontSize: FontUtils.sizeToPixels("large")
767+
768+ function adjustTextSize()
769+ {
770+ // avoid infinite recursion here
771+ if (__adjusting) {
772+ return;
773+ }
774+
775+ __adjusting = true;
776+
777+ // start by resetting the font size to discover the scale that should be used
778+ font.pixelSize = maximumFontSize
779+
780+ // check if it really needs to be scaled
781+ if (contentWidth > width) {
782+ var factor = width / contentWidth;
783+ font.pixelSize = Math.max(font.pixelSize * factor, minimumFontSize);
784+ }
785+ __adjusting = false
786+ }
787+
788+ anchors {
789+ left: parent.left
790+ leftMargin: units.gu(2)
791+ right: parent.right
792+ rightMargin: units.gu(2)
793+ verticalCenter: parent.verticalCenter
794+ }
795+ horizontalAlignment: (text.length < 19 ? TextInput.AlignHCenter : TextInput.AlignRight)
796+ font.pixelSize: maximumFontSize
797 font.family: "Ubuntu"
798- color: "#AAAAAA"
799- maximumLength: 20
800+ color: UbuntuColors.darkGrey
801 focus: true
802 cursorVisible: true
803 clip: true
804- opacity: 0.9
805 defaultRegion: PhoneUtils.defaultRegion
806 updateOnlyWhenFocused: false
807 // FIXME: this should probably be done in the component itself
808@@ -63,7 +83,7 @@
809 anchors.bottom: parent.bottom
810 width: units.dp(3)
811 color: "#DD4814"
812- visible: input.text != ""
813+ visible: input.text !== ""
814 }
815
816 // force cursor to be always visible
817@@ -72,24 +92,7 @@
818 cursorVisible = true
819 }
820
821- onContentWidthChanged: {
822- // avoid infinite recursion here
823- if (__adjusting) {
824- return;
825- }
826-
827- __adjusting = true;
828-
829- // start by resetting the font size to discover the scale that should be used
830- font.pixelSize = units.dp(39);
831-
832- // check if it really needs to be scaled
833- if (contentWidth > width) {
834- var factor = width / contentWidth;
835- font.pixelSize = font.pixelSize * factor;
836- }
837- __adjusting = false;
838- }
839+ onContentWidthChanged: adjustTextSize()
840 }
841
842 MouseArea {
843@@ -99,7 +102,7 @@
844 input.cursorPosition = input.positionAt(mouseX,TextInput.CursorOnCharacter)
845 }
846 onPressAndHold: {
847- if (input.text != "") {
848+ if (input.text !== "") {
849 held = true
850 input.selectAll()
851 input.copy()
852@@ -112,20 +115,16 @@
853 input.deselect()
854 held = false
855 }
856-
857 }
858 }
859
860 Label {
861 id: hint
862- visible: input.text == ""
863- anchors.centerIn: input
864+ visible: input.text === ""
865+ anchors.centerIn: parent
866 text: ""
867- fontSize: "x-large"
868- font.weight: Font.Light
869- font.family: "Ubuntu"
870- color: "#464646"
871+ font.pixelSize: input.maximumFontSize
872+ color: UbuntuColors.darkGrey
873 opacity: 0.9
874 }
875-
876 }
877
878=== modified file 'src/qml/HistoryPage/ExpandableButton.qml'
879--- src/qml/HistoryPage/ExpandableButton.qml 2013-10-10 17:36:08 +0000
880+++ src/qml/HistoryPage/ExpandableButton.qml 2014-08-04 18:47:59 +0000
881@@ -15,7 +15,7 @@
882 */
883
884 import QtQuick 2.0
885-import Ubuntu.Components 0.1
886+import Ubuntu.Components 1.1
887 import Ubuntu.Components.ListItems 0.1 as ListItem
888
889 ListItem.Empty {
890
891=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
892--- src/qml/HistoryPage/HistoryDelegate.qml 2014-07-30 17:55:22 +0000
893+++ src/qml/HistoryPage/HistoryDelegate.qml 2014-08-04 18:47:59 +0000
894@@ -17,7 +17,7 @@
895 */
896
897 import QtQuick 2.0
898-import Ubuntu.Components 0.1
899+import Ubuntu.Components 1.1
900 import Ubuntu.Components.ListItems 0.1 as ListItem
901 import Ubuntu.Components.Popups 0.1
902 import Ubuntu.Telephony 0.1
903@@ -37,8 +37,8 @@
904
905 property string phoneNumberSubTypeLabel: ""
906 property bool isFirst: false
907- property bool selected: false
908 property bool fullView: false
909+ property bool active: false
910
911 function activate() {
912 // ignore private and unknown numbers
913@@ -63,8 +63,8 @@
914 }
915 }
916
917+ height: units.gu(8)
918 color: Theme.palette.normal.background
919- height: mainSection.height
920 triggerActionOnMouseRelease: true
921
922 states: [
923@@ -90,21 +90,18 @@
924 }
925 ]
926
927-
928- Rectangle {
929- anchors.fill: parent
930- color: "black"
931- opacity: historyDelegate.selected ? 0.2 : 0
932- Behavior on opacity {
933- UbuntuNumberAnimation { }
934- }
935- }
936-
937 Item {
938 id: helper
939
940 function updateSubTypeLabel() {
941- phoneNumberSubTypeLabel = contactWatcher.isUnknown ? model.participants[0] : phoneTypeModel.get(phoneTypeModel.getTypeIndex(phoneDetail)).label
942+ var subLabel = contactWatcher.isUnknown
943+ if (model.participants[0]) {
944+ var typeInfo = phoneTypeModel.get(phoneTypeModel.getTypeIndex(phoneDetail))
945+ if (typeInfo) {
946+ subLabel = typeInfo.label
947+ }
948+ }
949+ phoneNumberSubTypeLabel = subLabel
950 }
951
952 Component.onCompleted: updateSubTypeLabel()
953@@ -130,96 +127,96 @@
954 }
955 }
956
957- Item {
958- id: mainSection
959+ Rectangle {
960+ anchors {
961+ fill: parent
962+ topMargin: units.gu(-1)
963+ bottomMargin: units.gu(-1)
964+ leftMargin: units.gu(-2)
965+ rightMargin: units.gu(-2)
966+ }
967+ opacity: historyDelegate.active ? 0.2 : 0.0
968+ color: "black"
969+ Behavior on opacity {
970+ UbuntuNumberAnimation {}
971+ }
972+ }
973
974+ ContactAvatar {
975+ id: avatar
976 anchors {
977 left: parent.left
978- right: parent.right
979- top: parent.top
980- }
981- height: units.gu(8)
982-
983- ContactAvatar {
984- id: avatar
985- anchors.left: parent.left
986- anchors.leftMargin: units.gu(1)
987- anchors.verticalCenter: parent.verticalCenter
988- height: units.gu(6)
989- width: height
990- fallbackAvatarUrl: contactWatcher.avatar === "" ? "image://theme/stock_contact" : contactWatcher.avatar
991- fallbackDisplayName: contactWatcher.alias !== "" ? contactWatcher.alias : contactWatcher.phoneNumber
992- showAvatarPicture: (fallbackAvatarUrl != "image://theme/stock_contact") || (initials.length === 0)
993- }
994-
995- Label {
996- id: titleLabel
997- anchors {
998- top: parent.top
999- topMargin: units.gu(2)
1000- left: avatar.right
1001- leftMargin: units.gu(2)
1002- right: time.left
1003- rightMargin: units.gu(1)
1004- }
1005- height: units.gu(2)
1006- verticalAlignment: Text.AlignVCenter
1007- fontSize: "medium"
1008- text: {
1009- if (contactWatcher.phoneNumber == "x-ofono-private") {
1010- return i18n.tr("Private number")
1011- } else if (contactWatcher.phoneNumber == "x-ofono-unknown") {
1012- return i18n.tr("Unknown number")
1013- } else if (contactWatcher.alias != "") {
1014- return contactWatcher.alias
1015- }
1016- return PhoneUtils.PhoneUtils.format(contactWatcher.phoneNumber)
1017- }
1018- elide: Text.ElideRight
1019- color: UbuntuColors.lightAubergine
1020- }
1021-
1022- Label {
1023- id: phoneLabel
1024- anchors {
1025- bottom: parent.bottom
1026- bottomMargin: units.gu(2)
1027- left: avatar.right
1028- leftMargin: units.gu(2)
1029- }
1030- height: units.gu(2)
1031- verticalAlignment: Text.AlignVCenter
1032- fontSize: "small"
1033- // FIXME: handle conference call
1034- text: phoneNumberSubTypeLabel
1035- visible: interactive && !contactWatcher.isUnknown // non-interactive entries are calls from unknown or private numbers
1036- }
1037-
1038- // time and duration on the right side of the delegate
1039- Label {
1040- id: time
1041- anchors {
1042- right: parent.right
1043- rightMargin: units.gu(2)
1044- verticalCenter: titleLabel.verticalCenter
1045- }
1046- height: units.gu(2)
1047- verticalAlignment: Text.AlignVCenter
1048- fontSize: "small"
1049- text: Qt.formatTime(model.timestamp, "hh:mm")
1050- }
1051-
1052- Label {
1053- id: callType
1054- anchors {
1055- right: parent.right
1056- rightMargin: units.gu(2)
1057- verticalCenter: phoneLabel.verticalCenter
1058- }
1059- height: units.gu(2)
1060- verticalAlignment: Text.AlignVCenter
1061- fontSize: "small"
1062- text: selectCallType()
1063- }
1064+ top: parent.top
1065+ bottom: parent.bottom
1066+ }
1067+ width: height
1068+ fallbackAvatarUrl: contactWatcher.avatar === "" ? "image://theme/stock_contact" : contactWatcher.avatar
1069+ fallbackDisplayName: contactWatcher.alias !== "" ? contactWatcher.alias : contactWatcher.phoneNumber
1070+ showAvatarPicture: (fallbackAvatarUrl != "image://theme/stock_contact") || (initials.length === 0)
1071+ }
1072+
1073+ Label {
1074+ id: titleLabel
1075+ anchors {
1076+ top: parent.top
1077+ left: avatar.right
1078+ leftMargin: units.gu(2)
1079+ right: time.left
1080+ }
1081+ height: units.gu(2)
1082+ verticalAlignment: Text.AlignVCenter
1083+ fontSize: "medium"
1084+ text: {
1085+ if (contactWatcher.phoneNumber == "x-ofono-private") {
1086+ return i18n.tr("Private number")
1087+ } else if (contactWatcher.phoneNumber == "x-ofono-unknown") {
1088+ return i18n.tr("Unknown number")
1089+ } else if (contactWatcher.alias != "") {
1090+ return contactWatcher.alias
1091+ }
1092+ return PhoneUtils.PhoneUtils.format(contactWatcher.phoneNumber)
1093+ }
1094+ elide: Text.ElideRight
1095+ color: UbuntuColors.lightAubergine
1096+ }
1097+
1098+ Label {
1099+ id: phoneLabel
1100+ anchors {
1101+ bottom: parent.bottom
1102+ left: avatar.right
1103+ leftMargin: units.gu(2)
1104+ }
1105+ height: units.gu(2)
1106+ verticalAlignment: Text.AlignVCenter
1107+ fontSize: "small"
1108+ // FIXME: handle conference call
1109+ text: phoneNumberSubTypeLabel
1110+ visible: interactive && !contactWatcher.isUnknown // non-interactive entries are calls from unknown or private numbers
1111+ }
1112+
1113+ // time and duration on the right side of the delegate
1114+ Label {
1115+ id: time
1116+ anchors {
1117+ right: parent.right
1118+ verticalCenter: titleLabel.verticalCenter
1119+ }
1120+ height: units.gu(2)
1121+ verticalAlignment: Text.AlignVCenter
1122+ fontSize: "small"
1123+ text: Qt.formatTime(model.timestamp, "hh:mm")
1124+ }
1125+
1126+ Label {
1127+ id: callType
1128+ anchors {
1129+ right: parent.right
1130+ verticalCenter: phoneLabel.verticalCenter
1131+ }
1132+ height: units.gu(2)
1133+ verticalAlignment: Text.AlignVCenter
1134+ fontSize: "small"
1135+ text: selectCallType()
1136 }
1137 }
1138
1139=== modified file 'src/qml/HistoryPage/HistoryPage.qml'
1140--- src/qml/HistoryPage/HistoryPage.qml 2014-07-25 18:49:29 +0000
1141+++ src/qml/HistoryPage/HistoryPage.qml 2014-08-04 18:47:59 +0000
1142@@ -17,7 +17,7 @@
1143 */
1144
1145 import QtQuick 2.0
1146-import Ubuntu.Components 0.1
1147+import Ubuntu.Components 1.1
1148 import Ubuntu.Components.ListItems 0.1 as ListItem
1149 import Ubuntu.History 0.1
1150 import Ubuntu.Telephony 0.1
1151@@ -48,47 +48,47 @@
1152 anchors.fill: parent
1153 color: Theme.palette.normal.background
1154 }
1155+ states: [
1156+ PageHeadState {
1157+ name: "select"
1158+ when: selectionMode
1159+ head: historyPage.head
1160
1161- ToolbarItems {
1162- id: historySelectionToolbar
1163- visible: false
1164- back: ToolbarButton {
1165- id: selectionModeCancelButton
1166- objectName: "selectionModeCancelButton"
1167- action: Action {
1168+ backAction: Action {
1169 objectName: "selectionModeCancelAction"
1170 iconName: "close"
1171 onTriggered: historyList.cancelSelection()
1172 }
1173- }
1174- ToolbarButton {
1175- id: selectionModeSelectAllButton
1176- objectName: "selectionModeSelectAllButton"
1177- action: Action {
1178- objectName: "selectionModeSelectAllAction"
1179- iconName: "filter"
1180- onTriggered: historyList.selectAll()
1181- }
1182- }
1183- ToolbarButton {
1184- id: selectionModeDeleteButton
1185- objectName: "selectionModeDeleteButton"
1186- action: Action {
1187- objectName: "selectionModeDeleteAction"
1188- enabled: historyList.selectedItems.count > 0
1189- iconName: "delete"
1190- onTriggered: historyList.endSelection()
1191- }
1192- }
1193- }
1194-
1195- tools: selectionMode ? historySelectionToolbar : null
1196+
1197+ actions: [
1198+ Action {
1199+ objectName: "selectionModeSelectAllAction"
1200+ iconName: "select"
1201+ onTriggered: {
1202+ if (historyList.selectedItems.count === historyList.count) {
1203+ historyList.clearSelection()
1204+ } else {
1205+ historyList.selectAll()
1206+ }
1207+ }
1208+ },
1209+ Action {
1210+ objectName: "selectionModeDeleteAction"
1211+ enabled: historyList.selectedItems.count > 0
1212+ iconName: "delete"
1213+ onTriggered: historyList.endSelection()
1214+ }
1215+ ]
1216+ }
1217+ ]
1218+
1219 onActiveChanged: {
1220 if (!active) {
1221 if (selectionMode) {
1222 historyList.cancelSelection();
1223 }
1224 historyList.resetSwipe()
1225+ historyList.positionViewAtBeginning()
1226 }
1227
1228 }
1229@@ -202,10 +202,12 @@
1230 right: parent.right
1231 }
1232
1233- selected: historyDelegate.ListView.isCurrentItem || historyList.isSelected(historyDelegate)
1234+ selected: historyList.isSelected(historyDelegate)
1235+ selectionMode: historyList.isInSelectionMode
1236 isFirst: model.index === 0
1237 locked: historyList.isInSelectionMode
1238 fullView: historyPage.fullView
1239+ active: ListView.isCurrentItem
1240
1241 // Animate item removal
1242 ListView.onRemove: SequentialAnimation {
1243
1244=== modified file 'src/qml/HistoryPage/Timeline.qml'
1245--- src/qml/HistoryPage/Timeline.qml 2013-10-09 14:46:13 +0000
1246+++ src/qml/HistoryPage/Timeline.qml 2014-08-04 18:47:59 +0000
1247@@ -17,7 +17,7 @@
1248 */
1249
1250 import QtQuick 2.0
1251-import Ubuntu.Components 0.1
1252+import Ubuntu.Components 1.1
1253
1254 Item {
1255 property bool isFirst: false
1256
1257=== modified file 'src/qml/LiveCallPage/ConferenceCallDisplay.qml'
1258--- src/qml/LiveCallPage/ConferenceCallDisplay.qml 2014-03-07 21:11:59 +0000
1259+++ src/qml/LiveCallPage/ConferenceCallDisplay.qml 2014-08-04 18:47:59 +0000
1260@@ -17,7 +17,7 @@
1261 */
1262
1263 import QtQuick 2.0
1264-import Ubuntu.Components 0.1
1265+import Ubuntu.Components 1.1
1266 import Ubuntu.Components.ListItems 0.1 as ListItem
1267 import Ubuntu.Telephony 0.1
1268
1269
1270=== modified file 'src/qml/LiveCallPage/HangupButton.qml'
1271--- src/qml/LiveCallPage/HangupButton.qml 2014-05-23 08:30:55 +0000
1272+++ src/qml/LiveCallPage/HangupButton.qml 2014-08-04 18:47:59 +0000
1273@@ -17,7 +17,7 @@
1274 */
1275
1276 import QtQuick 2.0
1277-import Ubuntu.Components 0.1
1278+import Ubuntu.Components 1.1
1279
1280 AbstractButton {
1281 id: button
1282
1283=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
1284--- src/qml/LiveCallPage/LiveCall.qml 2014-06-25 19:34:44 +0000
1285+++ src/qml/LiveCallPage/LiveCall.qml 2014-08-04 18:47:59 +0000
1286@@ -18,7 +18,7 @@
1287
1288 import QtQuick 2.0
1289 import QtGraphicalEffects 1.0
1290-import Ubuntu.Components 0.1
1291+import Ubuntu.Components 1.1
1292 import Ubuntu.Components.ListItems 0.1 as ListItems
1293 import Ubuntu.Telephony 0.1
1294 import Ubuntu.Contacts 0.1
1295@@ -40,43 +40,36 @@
1296 property bool isVoicemail: call ? call.voicemail : false
1297 property string phoneNumberSubTypeLabel: ""
1298 property string caller: {
1299- if (contactWatcher.alias != "") {
1300+ if (contactWatcher.alias !== "") {
1301 return contactWatcher.alias;
1302+ } else if (contactWatcher.phoneNumber !== "") {
1303+ return contactWatcher.phoneNumber;
1304 } else {
1305- return contactWatcher.phoneNumber;
1306+ return "Calling..."
1307 }
1308 }
1309- title: caller //i18n.tr("Call")
1310- ToolbarItems {
1311- id: regularToolbar
1312- visible: false
1313- back: ToolbarButton {
1314- action: Action {
1315- objectName: "fakeBackButton"
1316- }
1317- }
1318- ToolbarButton {
1319+
1320+ property list<Action> regularActions: [
1321+ Action {
1322+ objectName: "fakeBackButton"
1323+ visible: false
1324+ },
1325+ Action {
1326 objectName: "newCallButton"
1327- action: Action {
1328- iconName: "contact"
1329- text: i18n.tr("New Call")
1330- onTriggered: pageStack.push(Qt.resolvedUrl("../ContactsPage/ContactsPage.qml"))
1331- }
1332- }
1333- }
1334-
1335- ToolbarItems {
1336- id: greeterModeToolbar
1337- visible: false
1338- back: ToolbarButton {
1339- action: Action {
1340- objectName: "fakeBackButton"
1341- }
1342- }
1343- }
1344-
1345- tools: greeter.greeterActive ? greeterModeToolbar : regularToolbar
1346-
1347+ iconName: "contact"
1348+ text: i18n.tr("New Call")
1349+ onTriggered: pageStack.push(Qt.resolvedUrl("../ContactsPage/ContactsPage.qml"))
1350+ }
1351+ ]
1352+ property list<Action> greeterModeActions: [
1353+ Action {
1354+ objectName: "fakeBackButton"
1355+ visible: false
1356+ }
1357+ ]
1358+
1359+ title: caller
1360+ head.actions: greeter.greeterActive ? greeterModeActions : regularActions
1361 x: header ? header.height : 0
1362
1363 // if there are no calls, just reset the view
1364@@ -303,7 +296,6 @@
1365 id: keypad
1366
1367 anchors.bottom: parent.bottom
1368- anchors.bottomMargin: units.gu(2)
1369 anchors.horizontalCenter: parent.horizontalCenter
1370 onKeyPressed: {
1371 if (call) {
1372@@ -324,7 +316,7 @@
1373 anchors {
1374 horizontalCenter: parent.horizontalCenter
1375 bottom: footer.top
1376- bottomMargin: units.gu(2)
1377+ bottomMargin: units.gu(1)
1378 }
1379
1380 LiveCallKeypadButton {
1381
1382=== modified file 'src/qml/LiveCallPage/LiveCallKeypadButton.qml'
1383--- src/qml/LiveCallPage/LiveCallKeypadButton.qml 2014-05-20 08:17:35 +0000
1384+++ src/qml/LiveCallPage/LiveCallKeypadButton.qml 2014-08-04 18:47:59 +0000
1385@@ -17,7 +17,7 @@
1386 */
1387
1388 import QtQuick 2.0
1389-import Ubuntu.Components 0.1
1390+import Ubuntu.Components 1.1
1391
1392 AbstractButton {
1393 id: button
1394
1395=== modified file 'src/qml/LiveCallPage/MultiCallDisplay.qml'
1396--- src/qml/LiveCallPage/MultiCallDisplay.qml 2014-04-08 19:56:50 +0000
1397+++ src/qml/LiveCallPage/MultiCallDisplay.qml 2014-08-04 18:47:59 +0000
1398@@ -17,7 +17,7 @@
1399 */
1400
1401 import QtQuick 2.0
1402-import Ubuntu.Components 0.1
1403+import Ubuntu.Components 1.1
1404 import Ubuntu.Telephony 0.1
1405
1406 Column {
1407
1408=== modified file 'src/qml/LiveCallPage/StopWatch.qml'
1409--- src/qml/LiveCallPage/StopWatch.qml 2014-05-20 08:17:35 +0000
1410+++ src/qml/LiveCallPage/StopWatch.qml 2014-08-04 18:47:59 +0000
1411@@ -17,7 +17,7 @@
1412 */
1413
1414 import QtQuick 2.0
1415-import Ubuntu.Components 0.1
1416+import Ubuntu.Components 1.1
1417
1418 Item {
1419 function pad(text, length) {
1420
1421=== removed file 'src/qml/PageWithBottomEdge.qml'
1422--- src/qml/PageWithBottomEdge.qml 2014-07-11 18:48:12 +0000
1423+++ src/qml/PageWithBottomEdge.qml 1970-01-01 00:00:00 +0000
1424@@ -1,434 +0,0 @@
1425-/*
1426- * Copyright (C) 2014 Canonical, Ltd.
1427- *
1428- * This program is free software; you can redistribute it and/or modify
1429- * it under the terms of the GNU General Public License as published by
1430- * the Free Software Foundation; version 3.
1431- *
1432- * This program is distributed in the hope that it will be useful,
1433- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1434- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1435- * GNU General Public License for more details.
1436- *
1437- * You should have received a copy of the GNU General Public License
1438- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1439- */
1440-
1441-/*
1442- Example:
1443-
1444- MainView {
1445- objectName: "mainView"
1446-
1447- applicationName: "com.ubuntu.developer.boiko.bottomedge"
1448-
1449- width: units.gu(100)
1450- height: units.gu(75)
1451-
1452- Component {
1453- id: pageComponent
1454-
1455- PageWithBottomEdge {
1456- id: mainPage
1457- title: i18n.tr("Main Page")
1458-
1459- Rectangle {
1460- anchors.fill: parent
1461- color: "white"
1462- }
1463-
1464- bottomEdgePageComponent: Page {
1465- title: "Contents"
1466- anchors.fill: parent
1467- //anchors.topMargin: contentsPage.flickable.contentY
1468-
1469- ListView {
1470- anchors.fill: parent
1471- model: 50
1472- delegate: ListItems.Standard {
1473- text: "One Content Item: " + index
1474- }
1475- }
1476- }
1477- bottomEdgeTitle: i18n.tr("Bottom edge action")
1478- }
1479- }
1480-
1481- PageStack {
1482- id: stack
1483- Component.onCompleted: stack.push(pageComponent)
1484- }
1485- }
1486-
1487-*/
1488-
1489-import QtQuick 2.0
1490-import Ubuntu.Components 0.1
1491-
1492-Page {
1493- id: page
1494-
1495- property alias bottomEdgePageComponent: edgeLoader.sourceComponent
1496- property alias bottomEdgePageSource: edgeLoader.source
1497- property alias bottomEdgeTitle: tipLabel.text
1498- property alias bottomEdgeEnabled: bottomEdge.visible
1499- property int bottomEdgeExpandThreshold: page.height * 0.2
1500- property int bottomEdgeExposedArea: bottomEdge.state !== "expanded" ? (page.height - bottomEdge.y - bottomEdge.tipHeight) : _areaWhenExpanded
1501- property bool reloadBottomEdgePage: true
1502-
1503- readonly property alias bottomEdgePage: edgeLoader.item
1504- readonly property bool isReady: (tip.opacity === 0.0) && (bottomEdge.y === bottomEdge.pageStartY)
1505- readonly property bool isCollapsed: (tip.opacity === 1.0)
1506- readonly property bool bottomEdgePageLoaded: (edgeLoader.status == Loader.Ready)
1507-
1508- property bool _showEdgePageWhenReady: false
1509- property int _areaWhenExpanded: 0
1510-
1511- signal bottomEdgeReleased()
1512- signal bottomEdgeDismissed()
1513-
1514-
1515- function showBottomEdgePage(source, properties)
1516- {
1517- edgeLoader.setSource(source, properties)
1518- _showEdgePageWhenReady = true
1519- }
1520-
1521- function setBottomEdgePage(source, properties)
1522- {
1523- edgeLoader.setSource(source, properties)
1524- }
1525-
1526- function _pushPage()
1527- {
1528- if (edgeLoader.status === Loader.Ready) {
1529- edgeLoader.item.active = true
1530- page.pageStack.push(edgeLoader.item)
1531- if (edgeLoader.item.flickable) {
1532- edgeLoader.item.flickable.contentY = -page.header.height
1533- edgeLoader.item.flickable.returnToBounds()
1534- }
1535-
1536- if (edgeLoader.item.ready)
1537- edgeLoader.item.ready()
1538- }
1539- }
1540-
1541-
1542- Component.onCompleted: {
1543- // avoid a binding on the expanded height value
1544- var expandedHeight = height;
1545- _areaWhenExpanded = expandedHeight;
1546- }
1547-
1548- onActiveChanged: {
1549- if (active) {
1550- bottomEdge.state = "collapsed"
1551- }
1552- }
1553-
1554- onBottomEdgePageLoadedChanged: {
1555- if (_showEdgePageWhenReady && bottomEdgePageLoaded) {
1556- bottomEdge.state = "expanded"
1557- _showEdgePageWhenReady = false
1558- }
1559- }
1560-
1561- Rectangle {
1562- id: bgVisual
1563-
1564- color: "black"
1565- anchors.fill: page
1566- opacity: 0.7 * ((page.height - bottomEdge.y) / page.height)
1567- z: 1
1568- }
1569-
1570- Timer {
1571- id: hideIndicator
1572-
1573- interval: 3000
1574- running: true
1575- repeat: false
1576- onTriggered: tipContainer.y = -units.gu(1)
1577- }
1578-
1579- Rectangle {
1580- id: bottomEdge
1581- objectName: "bottomEdge"
1582-
1583- readonly property int tipHeight: units.gu(3)
1584- readonly property var header: page.__propagated && page.__propagated.header ? page.__propagated.header : null
1585- readonly property int pageStartY: 0
1586-
1587- z: 1
1588- color: Theme.palette.normal.background
1589- parent: page
1590- anchors {
1591- left: parent.left
1592- right: parent.right
1593- }
1594- height: page.height
1595- y: height
1596-
1597- Rectangle {
1598- id: shadow
1599-
1600- anchors {
1601- left: parent.left
1602- right: parent.right
1603- }
1604- height: units.gu(1)
1605- y: -height
1606- opacity: 0.0
1607- gradient: Gradient {
1608- GradientStop { position: 0.0; color: "transparent" }
1609- GradientStop { position: 1.0; color: Qt.rgba(0, 0, 0, 0.2) }
1610- }
1611- }
1612-
1613- Item {
1614- id: tipContainer
1615- objectName: "bottomEdgeTip"
1616-
1617- width: childrenRect.width
1618- height: bottomEdge.tipHeight
1619- clip: true
1620- y: -bottomEdge.tipHeight
1621- anchors.horizontalCenter: parent.horizontalCenter
1622- Behavior on y {
1623- UbuntuNumberAnimation {}
1624- }
1625-
1626- UbuntuShape {
1627- id: tip
1628-
1629- width: tipLabel.paintedWidth + units.gu(6)
1630- height: bottomEdge.tipHeight + units.gu(1)
1631- color: Theme.palette.normal.overlay
1632- Label {
1633- id: tipLabel
1634-
1635- anchors {
1636- top: parent.top
1637- left: parent.left
1638- right: parent.right
1639- }
1640- height: bottomEdge.tipHeight
1641- verticalAlignment: Text.AlignVCenter
1642- horizontalAlignment: Text.AlignHCenter
1643- }
1644- }
1645- }
1646-
1647- MouseArea {
1648- preventStealing: true
1649- drag.axis: Drag.YAxis
1650- drag.target: bottomEdge
1651- drag.minimumY: bottomEdge.pageStartY
1652- drag.maximumY: page.height
1653-
1654- anchors {
1655- left: parent.left
1656- right: parent.right
1657- }
1658- height: bottomEdge.tipHeight
1659- y: -height
1660-
1661- onReleased: {
1662- page.bottomEdgeReleased()
1663- if (bottomEdge.y < (page.height - bottomEdgeExpandThreshold - bottomEdge.tipHeight)) {
1664- bottomEdge.state = "expanded"
1665- } else {
1666- bottomEdge.state = "collapsed"
1667- bottomEdge.y = bottomEdge.height
1668- }
1669- }
1670-
1671- onPressed: bottomEdge.state = "floating"
1672- }
1673-
1674- Behavior on y {
1675- UbuntuNumberAnimation {}
1676- }
1677-
1678- state: "collapsed"
1679- states: [
1680- State {
1681- name: "collapsed"
1682- PropertyChanges {
1683- target: bottomEdge
1684- y: bottomEdge.height
1685- }
1686- PropertyChanges {
1687- target: tip
1688- opacity: 1.0
1689- }
1690- PropertyChanges {
1691- target: tipContainer
1692- y: -bottomEdge.tipHeight
1693- }
1694- PropertyChanges {
1695- target: hideIndicator
1696- running: true
1697- }
1698- },
1699- State {
1700- name: "expanded"
1701- PropertyChanges {
1702- target: bottomEdge
1703- y: bottomEdge.pageStartY
1704- }
1705- PropertyChanges {
1706- target: tip
1707- opacity: 0.0
1708- }
1709- PropertyChanges {
1710- target: tipContainer
1711- y: -bottomEdge.tipHeight
1712- }
1713- PropertyChanges {
1714- target: hideIndicator
1715- running: false
1716- }
1717- },
1718- State {
1719- name: "floating"
1720- PropertyChanges {
1721- target: shadow
1722- opacity: 1.0
1723- }
1724- PropertyChanges {
1725- target: hideIndicator
1726- running: false
1727- }
1728- PropertyChanges {
1729- target: tipContainer
1730- y: -bottomEdge.tipHeight
1731- }
1732- }
1733- ]
1734-
1735- transitions: [
1736- Transition {
1737- to: "expanded"
1738- SequentialAnimation {
1739- UbuntuNumberAnimation {
1740- targets: [bottomEdge,tip]
1741- properties: "y,opacity"
1742- duration: UbuntuAnimation.SlowDuration
1743- }
1744- ScriptAction {
1745- script: page._pushPage()
1746- }
1747- }
1748- },
1749- Transition {
1750- from: "expanded"
1751- to: "collapsed"
1752- SequentialAnimation {
1753- ScriptAction {
1754- script: {
1755- Qt.inputMethod.hide()
1756- edgeLoader.item.parent = edgeLoader
1757- edgeLoader.item.anchors.fill = edgeLoader
1758- edgeLoader.item.active = false
1759- }
1760- }
1761- UbuntuNumberAnimation {
1762- targets: [bottomEdge,tip]
1763- properties: "y,opacity"
1764- duration: UbuntuAnimation.SlowDuration
1765- }
1766- ScriptAction {
1767- script: {
1768- // destroy current bottom page
1769- if (page.reloadBottomEdgePage) {
1770- edgeLoader.active = false
1771- }
1772-
1773- // notify
1774- page.bottomEdgeDismissed()
1775-
1776- // load a new bottom page in memory
1777- edgeLoader.active = true
1778-
1779- hideIndicator.restart()
1780- }
1781- }
1782- }
1783- },
1784- Transition {
1785- from: "floating"
1786- to: "collapsed"
1787- UbuntuNumberAnimation {
1788- targets: [bottomEdge,tip]
1789- properties: "y,opacity"
1790- }
1791- }
1792- ]
1793-
1794- Item {
1795- anchors.fill: parent
1796- clip: true
1797-
1798- Loader {
1799- id: edgeLoader
1800-
1801- z: 1
1802- active: true
1803- asynchronous: true
1804- anchors.fill: parent
1805-
1806- //WORKAROUND: The SDK move the page contents down to allocate space for the header we need to avoid that during the page dragging
1807- Binding {
1808- target: edgeLoader
1809- property: "anchors.topMargin"
1810- value: edgeLoader.item && edgeLoader.item.flickable ? -bottomEdge.header.height : 0
1811- when: (edgeLoader.status === Loader.Ready && !page.isReady)
1812- }
1813-
1814- Behavior on anchors.topMargin {
1815- UbuntuNumberAnimation {}
1816- }
1817-
1818- onLoaded: {
1819- if (page.isReady && edgeLoader.item.active != true) {
1820- page._pushPage()
1821- }
1822- }
1823- }
1824- }
1825-
1826- MouseArea {
1827- preventStealing: true
1828- drag.axis: Drag.YAxis
1829- drag.target: bottomEdge
1830- drag.minimumY: bottomEdge.pageStartY
1831- drag.maximumY: page.height
1832-
1833- anchors {
1834- left: parent.left
1835- right: parent.right
1836- }
1837- height: bottomEdge.tipHeight
1838- y: -height
1839- z: 2
1840-
1841- onReleased: {
1842- page.bottomEdgeReleased()
1843- if (bottomEdge.y < (page.height - bottomEdgeExpandThreshold - bottomEdge.tipHeight)) {
1844- bottomEdge.state = "expanded"
1845- } else {
1846- bottomEdge.state = "collapsed"
1847- bottomEdge.y = bottomEdge.height
1848- }
1849- }
1850-
1851- onPressed: {
1852- bottomEdge.state = "floating"
1853- bottomEdge.y -= bottomEdge.tipHeight
1854- }
1855- }
1856-
1857- }
1858-}
1859
1860=== modified file 'src/qml/dialer-app.qml'
1861--- src/qml/dialer-app.qml 2014-07-28 16:44:39 +0000
1862+++ src/qml/dialer-app.qml 2014-08-04 18:47:59 +0000
1863@@ -17,7 +17,7 @@
1864 */
1865
1866 import QtQuick 2.0
1867-import Ubuntu.Components 0.1
1868+import Ubuntu.Components 1.1
1869 import Ubuntu.Components.Popups 0.1
1870 import Ubuntu.Telephony 0.1
1871
1872@@ -92,6 +92,11 @@
1873 Qt.openUrlExternally("addressbook:///addnewphone?callback=dialer-app.desktop&phone=" + encodeURIComponent(phoneNumber))
1874 }
1875
1876+ function addPhoneToContact(contactId, phoneNumber) {
1877+ Qt.openUrlExternally("addressbook:///addphone?callback=dialer-app.desktop&id=%1&phone=%2".arg(encodeURIComponent(contactId))
1878+ .arg(encodeURIComponent(phoneNumber)))
1879+ }
1880+
1881 function sendMessage(phoneNumber) {
1882 Qt.openUrlExternally("message:///" + encodeURIComponent(phoneNumber))
1883 }
1884@@ -222,7 +227,7 @@
1885 Dialog {
1886 id: dialogue
1887 title: i18n.tr("No network")
1888- text: telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.accounts.displayName)
1889+ text: telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.account.displayName)
1890 : i18n.tr("There is currently no network.")
1891 Button {
1892 objectName: "closeNoNetworkDialog"
1893
1894=== modified file 'tests/autopilot/dialer_app/emulators.py'
1895--- tests/autopilot/dialer_app/emulators.py 2014-07-29 23:51:52 +0000
1896+++ tests/autopilot/dialer_app/emulators.py 2014-08-04 18:47:59 +0000
1897@@ -65,7 +65,7 @@
1898 """Bring the bottom edge page to the screen"""
1899 self.bottomEdgePageLoaded.wait_for(True)
1900 try:
1901- action_item = self.wait_select_single('QQuickItem',
1902+ action_item = self.wait_select_single('UbuntuShape',
1903 objectName='bottomEdgeTip')
1904 start_x = (action_item.globalRect.x +
1905 (action_item.globalRect.width * 0.5))
1906
1907=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
1908--- tests/autopilot/dialer_app/tests/test_calls.py 2014-06-13 21:52:17 +0000
1909+++ tests/autopilot/dialer_app/tests/test_calls.py 2014-08-04 18:47:59 +0000
1910@@ -71,7 +71,7 @@
1911 def get_history_for_number(self, number):
1912 # because of the bottom edge tree structure, multiple copies of the
1913 # same item are returned, so just use the first one
1914- return self.history_list.select_many("Label", text=number)[0]
1915+ return self.history_list.select_many("HistoryDelegate", phoneNumber=number)[0]
1916
1917 def test_outgoing_noanswer(self):
1918 """Outgoing call to a normal number, no answer"""

Subscribers

People subscribed via source and target branches