Merge lp:~tiagosh/phone-app/phone-app-1185064 into lp:phone-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 660
Merged at revision: 659
Proposed branch: lp:~tiagosh/phone-app/phone-app-1185064
Merge into: lp:phone-app
Diff against target: 55 lines (+17/-3)
3 files modified
debian/changelog (+6/-0)
src/qml/DetailViewContact/ContactDetails.qml (+1/-0)
src/qml/DetailViewContact/ContactDetailsHeader.qml (+10/-3)
To merge this branch: bzr merge lp:~tiagosh/phone-app/phone-app-1185064
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+166166@code.launchpad.net

Commit message

- Allow toggling favorite even when not editing a contact
- Increase the interaction area surrounding the favorite toggle

Description of the change

- Allow toggling favorite even when not editing a contact
- Increase the interaction area surrounding the favorite toggle

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
660. By Tiago Salem Herrmann

revert method renaming.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

works nice.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-05-28 22:49:25 +0000
3+++ debian/changelog 2013-05-29 13:26:28 +0000
4@@ -1,3 +1,9 @@
5+phone-app (0.59.12-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * Allow toggling favorite even when not editing a contact (LP: #1185064).
8+
9+ -- Tiago Salem Herrmann <tiago.herrmann@canonical.com> Wed, 29 May 2013 00:10:30 -0300
10+
11 phone-app (0.59.12-0ubuntu1) raring; urgency=low
12
13 * Added rotation support;
14
15=== modified file 'src/qml/DetailViewContact/ContactDetails.qml'
16--- src/qml/DetailViewContact/ContactDetails.qml 2013-05-27 17:54:18 +0000
17+++ src/qml/DetailViewContact/ContactDetails.qml 2013-05-29 13:26:28 +0000
18@@ -98,6 +98,7 @@
19 editable: contactDetails.editable
20 focus: true
21 backgroundColor: "#ededed"
22+ onFavoriteSaved: contactDetails.save()
23 }
24
25 function createNewContact(number) {
26
27=== modified file 'src/qml/DetailViewContact/ContactDetailsHeader.qml'
28--- src/qml/DetailViewContact/ContactDetailsHeader.qml 2013-03-21 17:12:14 +0000
29+++ src/qml/DetailViewContact/ContactDetailsHeader.qml 2013-05-29 13:26:28 +0000
30@@ -28,6 +28,7 @@
31 property variant editable: false
32 property alias contactNameValid: name.valid
33 property color backgroundColor: "transparent"
34+ signal favoriteSaved()
35
36 width: parent.width
37 // ensure that there is equal padding at the top and bottom of labelBox
38@@ -74,9 +75,15 @@
39 source: contact.isFavorite ? "../assets/favorite-selected.png" : "../assets/favorite-unselected.png"
40
41 MouseArea {
42- enabled: editable
43- anchors.fill: parent
44- onClicked: contact.isFavorite = !contact.isFavorite
45+ anchors.centerIn: parent
46+ height: units.gu(3)
47+ width: units.gu(3)
48+ onClicked: {
49+ contact.isFavorite = !contact.isFavorite
50+ if (!editable) {
51+ contactDetailsHeader.favoriteSaved()
52+ }
53+ }
54 }
55 }
56

Subscribers

People subscribed via source and target branches