Merge lp:~renatofilho/address-book-app/visuals-update into lp:address-book-app
- visuals-update
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bill Filler |
Approved revision: | 538 |
Merged at revision: | 536 |
Proposed branch: | lp:~renatofilho/address-book-app/visuals-update |
Merge into: | lp:address-book-app |
Diff against target: |
369 lines (+119/-24) 16 files modified
src/imports/Settings/SettingsPage.qml (+3/-3) src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml (+2/-1) src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml (+0/-1) src/imports/Ubuntu/AddressBook/ContactView/BasicFieldView.qml (+0/-1) src/imports/Ubuntu/Contacts/CMakeLists.txt (+1/-0) src/imports/Ubuntu/Contacts/ContactAvatar.qml (+19/-7) src/imports/Ubuntu/Contacts/ContactDelegate.qml (+1/-1) src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml (+0/-2) src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml (+0/-1) src/imports/Ubuntu/Contacts/Contacts.js (+7/-0) src/imports/Ubuntu/Contacts/FastScroll.qml (+20/-5) src/imports/Ubuntu/Contacts/ListItemWithActions.qml (+1/-1) src/imports/Ubuntu/Contacts/Triangle.qml (+52/-0) src/imports/Ubuntu/Contacts/contacts.cpp (+5/-0) src/imports/Ubuntu/Contacts/contacts.h (+1/-0) tests/qml/tst_ContactAvatar.qml (+7/-1) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/visuals-update |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ubuntu Phablet Team | Pending | ||
Review via email:
|
Commit message
Use a list of colors as avatar background color.
Use flat visual for avatar ubuntu shape.
Does not use 'lightAubergine' for labels.
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 533. By Renato Araujo Oliveira Filho
-
Update visuals for fast scrool.
- 534. By Renato Araujo Oliveira Filho
-
Update ContactAvatar test to work with the new component.
- 535. By Renato Araujo Oliveira Filho
-
Fixed warning messaging while creating ContactEditorPage.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:535
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 536. By Renato Araujo Oliveira Filho
-
Use a hahs of contact full name to create a better result.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:536
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 537. By Renato Araujo Oliveira Filho
-
Does not change the contact delegate label color to white while selected.
- 538. By Renato Araujo Oliveira Filho
-
Does not show orange rectangle on selected item in settings if no keyboard is present.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:538
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'src/imports/Settings/SettingsPage.qml' | |||
2 | --- src/imports/Settings/SettingsPage.qml 2016-01-05 14:04:19 +0000 | |||
3 | +++ src/imports/Settings/SettingsPage.qml 2016-02-04 13:19:27 +0000 | |||
4 | @@ -92,7 +92,7 @@ | |||
5 | 92 | Rectangle { | 92 | Rectangle { |
6 | 93 | color: UbuntuColors.orange | 93 | color: UbuntuColors.orange |
7 | 94 | anchors.fill: parent | 94 | anchors.fill: parent |
9 | 95 | visible:addGoogleAccountItem.activeFocus && pageStack.hasKeyboard | 95 | visible: addGoogleAccountItem.activeFocus && pageStack.hasKeyboard |
10 | 96 | z: -1 | 96 | z: -1 |
11 | 97 | } | 97 | } |
12 | 98 | } | 98 | } |
13 | @@ -116,12 +116,12 @@ | |||
14 | 116 | // FIXME: Using a private property here. This uses the old list item and the only way to change the text | 116 | // FIXME: Using a private property here. This uses the old list item and the only way to change the text |
15 | 117 | // color is with this property. | 117 | // color is with this property. |
16 | 118 | // We should remove it when update the app to the new ListItem. | 118 | // We should remove it when update the app to the new ListItem. |
18 | 119 | __foregroundColor: (activeFocus && (pageStack.columns > 1)) ? Theme.palette.normal.foregroundText : | 119 | __foregroundColor: (activeFocus && pageStack.hasKeyboard) ? Theme.palette.normal.foregroundText : |
19 | 120 | Theme.palette.normal.foreground | 120 | Theme.palette.normal.foreground |
20 | 121 | Rectangle { | 121 | Rectangle { |
21 | 122 | color: UbuntuColors.orange | 122 | color: UbuntuColors.orange |
22 | 123 | anchors.fill: parent | 123 | anchors.fill: parent |
24 | 124 | visible: importFromSimItem.activeFocus | 124 | visible: importFromSimItem.activeFocus && pageStack.hasKeyboard |
25 | 125 | z: -1 | 125 | z: -1 |
26 | 126 | } | 126 | } |
27 | 127 | } | 127 | } |
28 | 128 | 128 | ||
29 | === modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml' | |||
30 | --- src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-01-07 12:21:49 +0000 | |||
31 | +++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-02-04 13:19:27 +0000 | |||
32 | @@ -118,7 +118,8 @@ | |||
33 | 118 | if (!item) | 118 | if (!item) |
34 | 119 | return | 119 | return |
35 | 120 | 120 | ||
37 | 121 | var position = activeItem.mapToItem(editEditor, item.x, item.y); | 121 | |
38 | 122 | var position = item.mapToItem(editEditor, item.x, item.y); | ||
39 | 122 | // check if the item is already visible | 123 | // check if the item is already visible |
40 | 123 | var bottomY = scrollArea.contentY + scrollArea.height | 124 | var bottomY = scrollArea.contentY + scrollArea.height |
41 | 124 | var itemBottom = position.y + (item.height * 3) // extra margin | 125 | var itemBottom = position.y + (item.height * 3) // extra margin |
42 | 125 | 126 | ||
43 | === modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml' | |||
44 | --- src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml 2016-01-06 18:54:07 +0000 | |||
45 | +++ src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml 2016-02-04 13:19:27 +0000 | |||
46 | @@ -91,7 +91,6 @@ | |||
47 | 91 | overlaySpacing: 0 | 91 | overlaySpacing: 0 |
48 | 92 | frameSpacing: 0 | 92 | frameSpacing: 0 |
49 | 93 | background: Item {} | 93 | background: Item {} |
50 | 94 | color: UbuntuColors.lightAubergine | ||
51 | 95 | } | 94 | } |
52 | 96 | onActiveFocusChanged: { | 95 | onActiveFocusChanged: { |
53 | 97 | if (activeFocus) { | 96 | if (activeFocus) { |
54 | 98 | 97 | ||
55 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/BasicFieldView.qml' | |||
56 | --- src/imports/Ubuntu/AddressBook/ContactView/BasicFieldView.qml 2015-12-10 19:13:20 +0000 | |||
57 | +++ src/imports/Ubuntu/AddressBook/ContactView/BasicFieldView.qml 2016-02-04 13:19:27 +0000 | |||
58 | @@ -59,7 +59,6 @@ | |||
59 | 59 | 59 | ||
60 | 60 | // style | 60 | // style |
61 | 61 | fontSize: "medium" | 61 | fontSize: "medium" |
62 | 62 | color: UbuntuColors.lightAubergine | ||
63 | 63 | } | 62 | } |
64 | 64 | } | 63 | } |
65 | 65 | } | 64 | } |
66 | 66 | 65 | ||
67 | === modified file 'src/imports/Ubuntu/Contacts/CMakeLists.txt' | |||
68 | --- src/imports/Ubuntu/Contacts/CMakeLists.txt 2015-09-03 17:15:32 +0000 | |||
69 | +++ src/imports/Ubuntu/Contacts/CMakeLists.txt 2016-02-04 13:19:27 +0000 | |||
70 | @@ -31,6 +31,7 @@ | |||
71 | 31 | SIMList.qml | 31 | SIMList.qml |
72 | 32 | SIMCardImportPage.qml | 32 | SIMCardImportPage.qml |
73 | 33 | SubtitledWithColors.qml | 33 | SubtitledWithColors.qml |
74 | 34 | Triangle.qml | ||
75 | 34 | VCardParser.qml | 35 | VCardParser.qml |
76 | 35 | ) | 36 | ) |
77 | 36 | 37 | ||
78 | 37 | 38 | ||
79 | === modified file 'src/imports/Ubuntu/Contacts/ContactAvatar.qml' | |||
80 | --- src/imports/Ubuntu/Contacts/ContactAvatar.qml 2015-10-26 13:18:11 +0000 | |||
81 | +++ src/imports/Ubuntu/Contacts/ContactAvatar.qml 2016-02-04 13:19:27 +0000 | |||
82 | @@ -40,8 +40,9 @@ | |||
83 | 40 | initialsLabel.contactDisplayName = Qt.binding(function() { return ContactsJS.formatToDisplayWithDetails(contactElement, ContactDetail.Name, [Name.FirstName, Name.LastName], fallbackDisplayName) }) | 40 | initialsLabel.contactDisplayName = Qt.binding(function() { return ContactsJS.formatToDisplayWithDetails(contactElement, ContactDetail.Name, [Name.FirstName, Name.LastName], fallbackDisplayName) }) |
84 | 41 | } | 41 | } |
85 | 42 | 42 | ||
86 | 43 | aspect: UbuntuShape.Flat | ||
87 | 43 | radius: "medium" | 44 | radius: "medium" |
89 | 44 | backgroundColor: Theme.palette.normal.overlay | 45 | backgroundColor: ContactsJS.contactColor(displayName) |
90 | 45 | 46 | ||
91 | 46 | Label { | 47 | Label { |
92 | 47 | id: initialsLabel | 48 | id: initialsLabel |
93 | @@ -51,8 +52,8 @@ | |||
94 | 51 | 52 | ||
95 | 52 | anchors.centerIn: parent | 53 | anchors.centerIn: parent |
96 | 53 | text: Contacts.contactInitialsFromString(contactDisplayName) | 54 | text: Contacts.contactInitialsFromString(contactDisplayName) |
99 | 54 | color: UbuntuColors.lightAubergine | 55 | color: "white" |
100 | 55 | visible: (img.status != Image.Ready) | 56 | visible: (img.status != Image.Ready) && !fallbackIcon.visible |
101 | 56 | fontSize: "large" | 57 | fontSize: "large" |
102 | 57 | } | 58 | } |
103 | 58 | 59 | ||
104 | @@ -65,13 +66,24 @@ | |||
105 | 65 | 66 | ||
106 | 66 | property string avatarUrl: ContactsJS.getAvatar(contactElement, fallbackAvatarUrl) | 67 | property string avatarUrl: ContactsJS.getAvatar(contactElement, fallbackAvatarUrl) |
107 | 67 | 68 | ||
108 | 68 | anchors.centerIn: visible ? avatar : undefined | ||
109 | 69 | asynchronous: true | 69 | asynchronous: true |
112 | 70 | source: avatar.showAvatarPicture ? avatar.avatarUrl : "" | 70 | source: avatar.showAvatarPicture && (avatar.avatarUrl.indexOf("image://theme/") === -1) ? avatar.avatarUrl : "" |
113 | 71 | height: visible ? units.gu(3) : avatar.height | 71 | height: avatar.height |
114 | 72 | width: height | 72 | width: height |
116 | 73 | visible: avatar.avatarUrl.indexOf("image://theme/") === 0 | 73 | visible: false |
117 | 74 | sourceSize.width: avatar.width | 74 | sourceSize.width: avatar.width |
118 | 75 | sourceSize.height: avatar.height | 75 | sourceSize.height: avatar.height |
119 | 76 | } | 76 | } |
120 | 77 | |||
121 | 78 | Icon { | ||
122 | 79 | id: fallbackIcon | ||
123 | 80 | objectName: "fallbackIcon" | ||
124 | 81 | |||
125 | 82 | source: visible ? img.avatarUrl : "" | ||
126 | 83 | visible: avatar.showAvatarPicture && (avatar.avatarUrl.indexOf("image://theme/") === 0) | ||
127 | 84 | color: "white" | ||
128 | 85 | anchors.centerIn: avatar | ||
129 | 86 | height: units.gu(3) | ||
130 | 87 | width: height | ||
131 | 88 | } | ||
132 | 77 | } | 89 | } |
133 | 78 | 90 | ||
134 | === modified file 'src/imports/Ubuntu/Contacts/ContactDelegate.qml' | |||
135 | --- src/imports/Ubuntu/Contacts/ContactDelegate.qml 2015-12-10 19:13:20 +0000 | |||
136 | +++ src/imports/Ubuntu/Contacts/ContactDelegate.qml 2016-02-04 13:19:27 +0000 | |||
137 | @@ -76,7 +76,7 @@ | |||
138 | 76 | verticalCenter: parent.verticalCenter | 76 | verticalCenter: parent.verticalCenter |
139 | 77 | right: parent.right | 77 | right: parent.right |
140 | 78 | } | 78 | } |
142 | 79 | color: UbuntuColors.lightAubergine | 79 | color: UbuntuColors.darkGrey |
143 | 80 | text: root.displayLabel != "" ? root.displayLabel : i18n.dtr("address-book-app", "No name") | 80 | text: root.displayLabel != "" ? root.displayLabel : i18n.dtr("address-book-app", "No name") |
144 | 81 | elide: Text.ElideRight | 81 | elide: Text.ElideRight |
145 | 82 | } | 82 | } |
146 | 83 | 83 | ||
147 | === modified file 'src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml' | |||
148 | --- src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2015-10-26 13:18:11 +0000 | |||
149 | +++ src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2016-02-04 13:19:27 +0000 | |||
150 | @@ -80,7 +80,6 @@ | |||
151 | 80 | } | 80 | } |
152 | 81 | 81 | ||
153 | 82 | text: i18n.dtr("address-book-app", "Add number...") | 82 | text: i18n.dtr("address-book-app", "Add number...") |
154 | 83 | color: UbuntuColors.lightAubergine | ||
155 | 84 | } | 83 | } |
156 | 85 | visible: phoneNumberEntries.count == 0 | 84 | visible: phoneNumberEntries.count == 0 |
157 | 86 | MouseArea { | 85 | MouseArea { |
158 | @@ -104,7 +103,6 @@ | |||
159 | 104 | text: modelData.number | 103 | text: modelData.number |
160 | 105 | subText: phoneTypeModel.get(phoneTypeModel.getTypeIndex(modelData)).label | 104 | subText: phoneTypeModel.get(phoneTypeModel.getTypeIndex(modelData)).label |
161 | 106 | onClicked: root.detailClicked(modelData, "call") | 105 | onClicked: root.detailClicked(modelData, "call") |
162 | 107 | textColor: UbuntuColors.lightAubergine | ||
163 | 108 | 106 | ||
164 | 109 | MouseArea { | 107 | MouseArea { |
165 | 110 | anchors { | 108 | anchors { |
166 | 111 | 109 | ||
167 | === modified file 'src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml' | |||
168 | --- src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml 2015-10-26 13:18:11 +0000 | |||
169 | +++ src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml 2016-02-04 13:19:27 +0000 | |||
170 | @@ -73,7 +73,6 @@ | |||
171 | 73 | right: parent.right | 73 | right: parent.right |
172 | 74 | rightMargin: units.gu(2) | 74 | rightMargin: units.gu(2) |
173 | 75 | } | 75 | } |
174 | 76 | color: UbuntuColors.lightAubergine | ||
175 | 77 | elide: Text.ElideRight | 76 | elide: Text.ElideRight |
176 | 78 | visible: root.showContents | 77 | visible: root.showContents |
177 | 79 | } | 78 | } |
178 | 80 | 79 | ||
179 | === modified file 'src/imports/Ubuntu/Contacts/Contacts.js' | |||
180 | --- src/imports/Ubuntu/Contacts/Contacts.js 2015-06-01 18:26:26 +0000 | |||
181 | +++ src/imports/Ubuntu/Contacts/Contacts.js 2016-02-04 13:19:27 +0000 | |||
182 | @@ -1,5 +1,6 @@ | |||
183 | 1 | 1 | ||
184 | 2 | var phoneTypeModel = null | 2 | var phoneTypeModel = null |
185 | 3 | var contactColors = ["#DC3023", "#FF8936", "#FFB95A", "#8DB255", "#749F8D", "#48929B", "#A87CA0"] | ||
186 | 3 | 4 | ||
187 | 4 | // Format contact name to be displayed | 5 | // Format contact name to be displayed |
188 | 5 | function formatToDisplayWithDetails(contact, contactDetail, detailFields, defaultTitle) | 6 | function formatToDisplayWithDetails(contact, contactDetail, detailFields, defaultTitle) |
189 | @@ -145,3 +146,9 @@ | |||
190 | 145 | { | 146 | { |
191 | 146 | return (contact && (contact.contactId === "qtcontacts:::")) | 147 | return (contact && (contact.contactId === "qtcontacts:::")) |
192 | 147 | } | 148 | } |
193 | 149 | |||
194 | 150 | function contactColor(name) | ||
195 | 151 | { | ||
196 | 152 | var hash = Contacts.qHash(name) | ||
197 | 153 | return contactColors[(hash % contactColors.length)] | ||
198 | 154 | } | ||
199 | 148 | 155 | ||
200 | === modified file 'src/imports/Ubuntu/Contacts/FastScroll.qml' | |||
201 | --- src/imports/Ubuntu/Contacts/FastScroll.qml 2015-12-10 19:08:19 +0000 | |||
202 | +++ src/imports/Ubuntu/Contacts/FastScroll.qml 2016-02-04 13:19:27 +0000 | |||
203 | @@ -72,15 +72,16 @@ | |||
204 | 72 | } | 72 | } |
205 | 73 | 73 | ||
206 | 74 | 74 | ||
208 | 75 | Rectangle { | 75 | UbuntuShape { |
209 | 76 | id: magnified | 76 | id: magnified |
210 | 77 | 77 | ||
211 | 78 | aspect: UbuntuShape.Flat | ||
212 | 78 | color: Theme.palette.normal.foreground | 79 | color: Theme.palette.normal.foreground |
216 | 79 | radius: height * 0.3 | 80 | radius: "medium" |
217 | 80 | height: pinSize * 2 | 81 | height: units.gu(6) |
218 | 81 | width: height | 82 | width: units.gu(8) |
219 | 82 | opacity: internal.fastScrolling && root.enabled ? 1.0 : 0.0 | 83 | opacity: internal.fastScrolling && root.enabled ? 1.0 : 0.0 |
221 | 83 | x: -cursor.width - units.gu(3) | 84 | x: -magnified.width |
222 | 84 | y: { | 85 | y: { |
223 | 85 | if (internal.currentItem) { | 86 | if (internal.currentItem) { |
224 | 86 | var itemCenterY = rail.y + internal.currentItem.y + (internal.currentItem.height / 2) | 87 | var itemCenterY = rail.y + internal.currentItem.y + (internal.currentItem.height / 2) |
225 | @@ -90,6 +91,20 @@ | |||
226 | 90 | } | 91 | } |
227 | 91 | } | 92 | } |
228 | 92 | 93 | ||
229 | 94 | Triangle { | ||
230 | 95 | id: arrow | ||
231 | 96 | |||
232 | 97 | color: magnified.color | ||
233 | 98 | fill: true | ||
234 | 99 | height: units.gu(1.5) | ||
235 | 100 | width: units.gu(0.5) | ||
236 | 101 | anchors { | ||
237 | 102 | verticalCenter: parent.verticalCenter | ||
238 | 103 | right: parent.right | ||
239 | 104 | rightMargin: -width | ||
240 | 105 | } | ||
241 | 106 | } | ||
242 | 107 | |||
243 | 93 | Label { | 108 | Label { |
244 | 94 | color: Theme.palette.normal.foregroundText | 109 | color: Theme.palette.normal.foregroundText |
245 | 95 | anchors.fill: parent | 110 | anchors.fill: parent |
246 | 96 | 111 | ||
247 | === modified file 'src/imports/Ubuntu/Contacts/ListItemWithActions.qml' | |||
248 | --- src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2016-01-06 15:09:18 +0000 | |||
249 | +++ src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2016-02-04 13:19:27 +0000 | |||
250 | @@ -246,7 +246,7 @@ | |||
251 | 246 | width: units.gu(3) | 246 | width: units.gu(3) |
252 | 247 | height: units.gu(3) | 247 | height: units.gu(3) |
253 | 248 | name: modelData.iconName | 248 | name: modelData.iconName |
255 | 249 | color: root.activeAction === modelData ? UbuntuColors.lightAubergine : UbuntuColors.lightGrey | 249 | color: root.activeAction === modelData ? UbuntuColors.orange : UbuntuColors.lightGrey |
256 | 250 | } | 250 | } |
257 | 251 | } | 251 | } |
258 | 252 | } | 252 | } |
259 | 253 | 253 | ||
260 | === added file 'src/imports/Ubuntu/Contacts/Triangle.qml' | |||
261 | --- src/imports/Ubuntu/Contacts/Triangle.qml 1970-01-01 00:00:00 +0000 | |||
262 | +++ src/imports/Ubuntu/Contacts/Triangle.qml 2016-02-04 13:19:27 +0000 | |||
263 | @@ -0,0 +1,52 @@ | |||
264 | 1 | /* | ||
265 | 2 | * Copyright (C) 2016 Canonical, Ltd. | ||
266 | 3 | * | ||
267 | 4 | * This program is free software; you can redistribute it and/or modify | ||
268 | 5 | * it under the terms of the GNU General Public License as published by | ||
269 | 6 | * the Free Software Foundation; version 3. | ||
270 | 7 | * | ||
271 | 8 | * This program is distributed in the hope that it will be useful, | ||
272 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
273 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
274 | 11 | * GNU General Public License for more details. | ||
275 | 12 | * | ||
276 | 13 | * You should have received a copy of the GNU General Public License | ||
277 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
278 | 15 | */ | ||
279 | 16 | |||
280 | 17 | import QtQuick 2.4 | ||
281 | 18 | |||
282 | 19 | Canvas { | ||
283 | 20 | id: triangle | ||
284 | 21 | antialiasing: true | ||
285 | 22 | |||
286 | 23 | property color color: "#ffffff" | ||
287 | 24 | property int lineWidth: 3 | ||
288 | 25 | property bool fill: false | ||
289 | 26 | |||
290 | 27 | onLineWidthChanged:requestPaint(); | ||
291 | 28 | onFillChanged:requestPaint(); | ||
292 | 29 | |||
293 | 30 | onPaint: { | ||
294 | 31 | var ctx = getContext("2d"); | ||
295 | 32 | ctx.save(); | ||
296 | 33 | ctx.clearRect(0,0,triangle.width, triangle.height); | ||
297 | 34 | ctx.strokeStyle = triangle.color; | ||
298 | 35 | ctx.lineWidth = triangle.lineWidth | ||
299 | 36 | ctx.fillStyle = triangle.color | ||
300 | 37 | ctx.globalAlpha = 1.0 | ||
301 | 38 | ctx.lineJoin = "round"; | ||
302 | 39 | ctx.beginPath(); | ||
303 | 40 | |||
304 | 41 | ctx.translate(0, 0); | ||
305 | 42 | ctx.lineTo(0, triangle.height); | ||
306 | 43 | ctx.lineTo(triangle.width, 0.5 * triangle.height); | ||
307 | 44 | ctx.lineTo(0, 0); | ||
308 | 45 | |||
309 | 46 | if (triangle.fill) | ||
310 | 47 | ctx.fill(); | ||
311 | 48 | if (triangle.stroke) | ||
312 | 49 | ctx.stroke(); | ||
313 | 50 | ctx.restore(); | ||
314 | 51 | } | ||
315 | 52 | } | ||
316 | 0 | 53 | ||
317 | === modified file 'src/imports/Ubuntu/Contacts/contacts.cpp' | |||
318 | --- src/imports/Ubuntu/Contacts/contacts.cpp 2015-10-28 19:42:30 +0000 | |||
319 | +++ src/imports/Ubuntu/Contacts/contacts.cpp 2016-02-04 13:19:27 +0000 | |||
320 | @@ -109,6 +109,11 @@ | |||
321 | 109 | return QFile::exists(updaterLockFile()); | 109 | return QFile::exists(updaterLockFile()); |
322 | 110 | } | 110 | } |
323 | 111 | 111 | ||
324 | 112 | uint UbuntuContacts::qHash(const QString &str) | ||
325 | 113 | { | ||
326 | 114 | return ::qHash(str); | ||
327 | 115 | } | ||
328 | 116 | |||
329 | 112 | QString UbuntuContacts::updaterLockFile() | 117 | QString UbuntuContacts::updaterLockFile() |
330 | 113 | { | 118 | { |
331 | 114 | return QString("%1/%2").arg(QDir::tempPath()).arg("/address-book-updater.lock"); | 119 | return QString("%1/%2").arg(QDir::tempPath()).arg("/address-book-updater.lock"); |
332 | 115 | 120 | ||
333 | === modified file 'src/imports/Ubuntu/Contacts/contacts.h' | |||
334 | --- src/imports/Ubuntu/Contacts/contacts.h 2015-10-28 19:42:30 +0000 | |||
335 | +++ src/imports/Ubuntu/Contacts/contacts.h 2016-02-04 13:19:27 +0000 | |||
336 | @@ -40,6 +40,7 @@ | |||
337 | 40 | Q_INVOKABLE bool containsLetters(const QString &value); | 40 | Q_INVOKABLE bool containsLetters(const QString &value); |
338 | 41 | Q_INVOKABLE bool removeFile(const QUrl &file); | 41 | Q_INVOKABLE bool removeFile(const QUrl &file); |
339 | 42 | Q_INVOKABLE bool updateIsRunning() const; | 42 | Q_INVOKABLE bool updateIsRunning() const; |
340 | 43 | Q_INVOKABLE uint qHash(const QString &str); | ||
341 | 43 | 44 | ||
342 | 44 | Q_SIGNALS: | 45 | Q_SIGNALS: |
343 | 45 | void imageCopyDone(const QString &id, const QString &fileName); | 46 | void imageCopyDone(const QString &id, const QString &fileName); |
344 | 46 | 47 | ||
345 | === modified file 'tests/qml/tst_ContactAvatar.qml' | |||
346 | --- tests/qml/tst_ContactAvatar.qml 2015-10-26 13:18:11 +0000 | |||
347 | +++ tests/qml/tst_ContactAvatar.qml 2016-02-04 13:19:27 +0000 | |||
348 | @@ -151,14 +151,20 @@ | |||
349 | 151 | waitForRendering(avatarComponent); | 151 | waitForRendering(avatarComponent); |
350 | 152 | var avatarInitials = findChild(avatarComponent, "avatarInitials") | 152 | var avatarInitials = findChild(avatarComponent, "avatarInitials") |
351 | 153 | var avatarImage = findChild(avatarComponent, "avatarImage") | 153 | var avatarImage = findChild(avatarComponent, "avatarImage") |
352 | 154 | var avatarFallback = findChild(avatarComponent, "fallbackIcon") | ||
353 | 154 | 155 | ||
354 | 155 | avatarComponent.showAvatarPicture = true | 156 | avatarComponent.showAvatarPicture = true |
355 | 156 | tryCompare(avatarInitials, "visible", false) | 157 | tryCompare(avatarInitials, "visible", false) |
357 | 157 | tryCompare(avatarImage, "source", avatarComponent.fallbackAvatarUrl) | 158 | tryCompare(avatarImage, "source", "") |
358 | 159 | tryCompare(avatarFallback, "visible", true) | ||
359 | 160 | tryCompare(avatarFallback, "source", avatarComponent.fallbackAvatarUrl) | ||
360 | 158 | 161 | ||
361 | 159 | avatarComponent.showAvatarPicture = false | 162 | avatarComponent.showAvatarPicture = false |
362 | 160 | tryCompare(avatarImage, "source", "") | 163 | tryCompare(avatarImage, "source", "") |
363 | 161 | tryCompare(avatarImage, "status", Image.Null) | 164 | tryCompare(avatarImage, "status", Image.Null) |
364 | 165 | tryCompare(avatarFallback, "visible", false) | ||
365 | 166 | tryCompare(avatarFallback, "source", "") | ||
366 | 167 | |||
367 | 162 | tryCompare(avatarInitials, "visible", true) | 168 | tryCompare(avatarInitials, "visible", true) |
368 | 163 | } | 169 | } |
369 | 164 | } | 170 | } |
FAILED: Continuous integration, rev:532 jenkins. qa.ubuntu. com/job/ address- book-app- ci/1096/ jenkins. qa.ubuntu. com/job/ address- book-app- vivid-i386- ci/399/ console jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 6138/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 6149/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/1096/ rebuild
http://