~tiagosh/address-book-app/fix-1234234

« back to all changes in this revision

Viewing changes to src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml

- add "view profile" item.
- fix icons for expansible items. Fixes: https://bugs.launchpad.net/bugs/1231440.

Approved by PS Jenkins bot, Gustavo Pichorim Boiko.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
            width: parent.width
54
54
 
55
55
            Repeater {
 
56
                id: phoneNumberEntries
56
57
                model: contact ? contact.phoneNumbers : undefined
57
58
                ListItem.Empty {
58
59
                    showDivider: false
75
76
                    }
76
77
 
77
78
                    onClicked: detailClicked(modelData)
78
 
                    Image {
79
 
                        height: units.gu(3)
80
 
                        width: units.gu(3)
81
 
                        source: "../assets/dialer_call.png"
82
 
                        fillMode: Image.PreserveAspectFit
 
79
                    Icon {
 
80
                        height: units.gu(2)
 
81
                        width: units.gu(2)
 
82
                        name: "call-start"
 
83
                        color: "white"
 
84
                        rotation: 90
83
85
                        anchors {
84
86
                            right: parent.right
 
87
                            rightMargin: units.gu(2)
85
88
                            verticalCenter: parent.verticalCenter
86
89
                        }
87
90
                    }
95
98
                    }
96
99
                }
97
100
            }
 
101
            ListItem.Empty {
 
102
                showDivider: false
 
103
                height: units.gu(5)
 
104
                Column {
 
105
                    anchors.verticalCenter: parent.verticalCenter
 
106
                    anchors.left: parent.left
 
107
                    anchors.right: parent.right
 
108
                    anchors.leftMargin: units.gu(2)
 
109
                    anchors.rightMargin: units.gu(2)
 
110
                    Label {
 
111
                        text: i18n.tr("View contact's profile")
 
112
                        fontSize: "medium"
 
113
                    }
 
114
                }
 
115
                onClicked: applicationUtils.switchToAddressbookApp("contact://" + contact.contactId)
 
116
                Icon {
 
117
                    height: units.gu(2)
 
118
                    width: units.gu(2)
 
119
                    name: "contact"
 
120
                    anchors {
 
121
                        right: parent.right
 
122
                        rightMargin: units.gu(2)
 
123
                        verticalCenter: parent.verticalCenter
 
124
                    }
 
125
                }
 
126
                ListItem.ThinDivider {
 
127
                    visible: phoneNumberEntries.count !== 0
 
128
                    anchors {
 
129
                        bottom: parent.top
 
130
                        right: parent.right
 
131
                        left: parent.left
 
132
                    }
 
133
                }
 
134
            }
98
135
        }
99
136
    }
100
137
}