From f0b2dd171acd7c809325134f7c99a9cf03a214db Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 2 Mar 2018 11:50:52 +0100 Subject: actually load the contact when editing --- views/people/qml/People.qml | 10 ++++++---- views/people/qml/PersonComposer.qml | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/views/people/qml/People.qml b/views/people/qml/People.qml index e2879a9b..38a95d75 100644 --- a/views/people/qml/People.qml +++ b/views/people/qml/People.qml @@ -66,7 +66,11 @@ FocusScope { } visible: stack.depth > 1 iconName: Kube.Icons.goBack - onClicked: stack.pop() + onClicked: { + if(stack.depth == 1) + root.currentContact = "" + stack.pop() + } } Kube.TextField { id: searchBar @@ -229,7 +233,6 @@ FocusScope { right: parent.right margins: Kube.Units.largeSpacing } - text: "Edit" onClicked: { @@ -239,7 +242,6 @@ FocusScope { } } - Component { id: personComposer @@ -248,7 +250,7 @@ FocusScope { Kube.ContactController { id: contactController - contact: "" + contact: root.currentContact } color: Kube.Colors.viewBackgroundColor diff --git a/views/people/qml/PersonComposer.qml b/views/people/qml/PersonComposer.qml index e3140953..c85360a9 100644 --- a/views/people/qml/PersonComposer.qml +++ b/views/people/qml/PersonComposer.qml @@ -175,7 +175,7 @@ Flickable { delegate: Row { spacing: Kube.Units.smallSpacing Kube.Label { text: qsTr("(main)") } - Kube.TextField { text: modelData ; color: Kube.Colors.highlightColor } + Kube.TextField { width: Kube.Units.gridUnit * 15; text: modelData ; color: Kube.Colors.highlightColor } Item { width: Kube.Units.smallSpacing; height: 1 } } } @@ -205,7 +205,7 @@ Flickable { Row { spacing: Kube.Units.smallSpacing Kube.Label { text: qsTr("(main)") } - Kube.TextField { text: modelData ; opacity: 0.6 } + Kube.TextField { width: Kube.Units.gridUnit * 15; text: modelData} Item { width: Kube.Units.smallSpacing; height: 1 } } } -- cgit v1.2.3