Merge lp:~renatofilho/address-book-app/fix-header-margin into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 577
Merged at revision: 577
Proposed branch: lp:~renatofilho/address-book-app/fix-header-margin
Merge into: lp:address-book-app
Diff against target: 135 lines (+57/-40)
2 files modified
src/imports/Settings/SettingsPage.qml (+12/-3)
src/imports/Ubuntu/Contacts/SIMCardImportPage.qml (+45/-37)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-header-margin
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Bill Filler (community) Needs Fixing
Review via email: mp+292464@code.launchpad.net

Commit message

Fixed page header.

To post a comment you must log in.
576. By Renato Araujo Oliveira Filho

Fixed page header.

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

Phone number is still obscured by header

review: Needs Fixing
577. By Renato Araujo Oliveira Filho

Use fixed header for Setting page.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@bfiller, sorry I discovery that SDK header still buggy in some situations. After a discussion with SDK guys we agree in use fixed headers for now.

Silo is up-to-date now.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Settings/SettingsPage.qml'
2--- src/imports/Settings/SettingsPage.qml 2016-03-09 19:23:46 +0000
3+++ src/imports/Settings/SettingsPage.qml 2016-04-26 00:49:02 +0000
4@@ -27,7 +27,12 @@
5
6 property var contactListModel
7
8- title: i18n.tr("Settings")
9+ header: PageHeader {
10+ id: pageHeader
11+
12+ title: i18n.tr("Settings")
13+ flickable: null
14+ }
15
16 ContactsUI.SIMList {
17 id: simList
18@@ -37,11 +42,15 @@
19 id: myself
20 }
21
22- flickable: null
23 Flickable {
24 id: numberFlickable
25 contentHeight: childrenRect.height
26- anchors.fill: parent
27+ anchors {
28+ top: pageHeader.bottom
29+ left: parent.left
30+ right: parent.right
31+ bottom: parent.bottom
32+ }
33 clip: true
34
35 Column {
36
37=== modified file 'src/imports/Ubuntu/Contacts/SIMCardImportPage.qml'
38--- src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2016-02-04 14:15:10 +0000
39+++ src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2016-04-26 00:49:02 +0000
40@@ -33,7 +33,50 @@
41
42 signal importCompleted()
43
44- title: i18n.dtr("address-book-app", "SIM contacts")
45+ header: PageHeader {
46+ id: pageHeader
47+
48+ title: i18n.dtr("address-book-app", "SIM contacts")
49+ flickable: contactList.view
50+ trailingActionBar {
51+ actions: [
52+ Action {
53+ text: (contactList.selectedItems.count === contactList.count) ?
54+ i18n.dtr("address-book-app", "Unselect All") :
55+ i18n.dtr("address-book-app", "Select All")
56+ iconName: "select"
57+ onTriggered: {
58+ if (contactList.selectedItems.count === contactList.count) {
59+ contactList.clearSelection()
60+ } else {
61+ contactList.selectAll()
62+ }
63+ }
64+ visible: (contactList.count > 0)
65+ },
66+ Action {
67+ text: i18n.dtr("address-book-app", "Import")
68+ objectName: "confirmImport"
69+
70+ iconName: "tick"
71+ enabled: (contactList.selectedItems.count > 0)
72+ onTriggered: {
73+ root.state = "importing"
74+ var contacts = []
75+ var items = contactList.selectedItems
76+
77+ for (var i=0, iMax=items.count; i < iMax; i++) {
78+ contacts.push(items.get(i).model.contact)
79+ }
80+
81+ contactList.listModel.exportContacts(root.exportFile,
82+ [],
83+ contacts)
84+ }
85+ }
86+ ]
87+ }
88+ }
89
90 function lockedSIMCount()
91 {
92@@ -197,42 +240,7 @@
93 }
94 }
95
96- head.actions: [
97- Action {
98- text: (contactList.selectedItems.count === contactList.count) ?
99- i18n.dtr("address-book-app", "Unselect All") :
100- i18n.dtr("address-book-app", "Select All")
101- iconName: "select"
102- onTriggered: {
103- if (contactList.selectedItems.count === contactList.count) {
104- contactList.clearSelection()
105- } else {
106- contactList.selectAll()
107- }
108- }
109- visible: (contactList.count > 0)
110- },
111- Action {
112- text: i18n.dtr("address-book-app", "Import")
113- objectName: "confirmImport"
114-
115- iconName: "tick"
116- enabled: (contactList.selectedItems.count > 0)
117- onTriggered: {
118- root.state = "importing"
119- var contacts = []
120- var items = contactList.selectedItems
121-
122- for (var i=0, iMax=items.count; i < iMax; i++) {
123- contacts.push(items.get(i).model.contact)
124- }
125-
126- contactList.listModel.exportContacts(root.exportFile,
127- [],
128- contacts)
129- }
130- }
131- ]
132+
133
134 states: [
135 State {

Subscribers

People subscribed via source and target branches