~phablet-team/telephony-service/trunk

« back to all changes in this revision

Viewing changes to DetailViewContact/ContactDetails.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2012-10-30 13:42:30 UTC
  • mfrom: (441.1.1 marumbi-new-dialer2)
  • mto: This revision was merged to the branch mainline in revision 442.
  • Revision ID: tiago.herrmann@canonical.com-20121030134230-4gykrrqtqkh89l0b
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    onContactChanged: editable = false
21
21
 
22
22
    title: "Contact Details"
23
 
    width: 400
24
 
    height: 600
 
23
    width: units.gu(50)
 
24
    height: units.gu(75)
25
25
 
26
26
    function createNewContact() {
27
27
        contact = Qt.createQmlObject("import TelephonyApp 0.1; ContactEntry {}", contactModel);
116
116
        boundsBehavior: Flickable.StopAtBounds
117
117
        clip: true
118
118
        contentHeight: detailsList.height + bottomSeparatorLine.height +
119
 
                       (contactDetails.editable ? newDetailChooser.height + newDetailChooser.menuHeight + 10 : callLogSection.height)
 
119
                       (contactDetails.editable ? newDetailChooser.height + newDetailChooser.menuHeight + units.gu(1) : callLogSection.height)
120
120
 
121
121
        Column {
122
122
            id: detailsList
185
185
            anchors.top: detailsList.bottom
186
186
            anchors.left: parent.left
187
187
            anchors.right: parent.right
188
 
            height: visible ? 2 : 0
 
188
            height: visible ? units.dp(2) : 0
189
189
            source: "../Widgets/artwork/ListItemSeparator.png"
190
190
            visible: !callLogSection.visible || callLogSection.opacity != 1.0
191
191
        }
228
228
            anchors.left: parent.left
229
229
            anchors.right: parent.right
230
230
            anchors.top: detailsList.bottom
231
 
            anchors.leftMargin: 1
232
 
            anchors.rightMargin: 1
 
231
            anchors.leftMargin: units.dp(1)
 
232
            anchors.rightMargin: units.dp(1)
233
233
 
234
234
            opacity: (editable) ? 1.0 : 0.0
235
235
            contact: (editable) ? contactDetails.contact : null
236
 
            height: (editable) ? 32 : 0
 
236
            height: (editable) ? units.gu(4) : 0
237
237
 
238
238
            onSelected: {
239
239
                for (var i = 0; i < detailsList.children.length; i++) {
260
260
        anchors.left: parent.left
261
261
        anchors.right: parent.right
262
262
 
263
 
        height: 36
 
263
        height: units.gu(5)
264
264
 
265
265
        Rectangle {
266
266
            anchors.fill: parent
274
274
            anchors.top: parent.top
275
275
            anchors.left: parent.left
276
276
            anchors.right: parent.right
277
 
            height: 1
 
277
            height: units.dp(1)
278
278
            color: "white"
279
279
        }
280
280
 
289
289
            Button {
290
290
                id: deleteButton
291
291
 
292
 
                height: 27
 
292
                height: units.gu(3)
293
293
                anchors.verticalCenter: parent.verticalCenter
294
294
                anchors.left: parent.left
295
 
                anchors.leftMargin: 10
 
295
                anchors.leftMargin: units.gu(1)
296
296
                text: "Delete"
297
297
                opacity: (editable && !added) ? 1.0 : 0.0
298
298
 
306
306
            Button {
307
307
                id: cancelButton
308
308
 
309
 
                height: 27
 
309
                height: units.gu(3)
310
310
                anchors.verticalCenter: parent.verticalCenter
311
311
                anchors.right: editSaveButton.left
312
 
                anchors.rightMargin: 10
 
312
                anchors.rightMargin: units.gu(1)
313
313
                text: "Cancel"
314
314
                opacity: (editable) ? 1.0 : 0.0
315
315
                onClicked: {
325
325
            Button {
326
326
                id: editSaveButton
327
327
 
328
 
                height: 27
 
328
                height: units.gu(3)
329
329
                anchors.verticalCenter: parent.verticalCenter
330
330
                anchors.right: parent.right
331
 
                anchors.rightMargin: 10
 
331
                anchors.rightMargin: units.gu(1)
332
332
                color: editable ? "#dd4f22" : "#e3e5e8"
333
333
                text: (editable) ? "Save" : "Edit"
334
334
                enabled: !editable || header.contactNameValid