From dfc0042f5b22bf6aa873b10b25e5b661f1754ecf Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sun, 19 Mar 2017 20:59:33 +0100 Subject: add firstname and lastname roles to peoplemodel, update ui to display them --- components/package/contents/ui/People.qml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/People.qml b/components/package/contents/ui/People.qml index 9f76aebf..444e2430 100644 --- a/components/package/contents/ui/People.qml +++ b/components/package/contents/ui/People.qml @@ -125,6 +125,7 @@ Popup { model: KubeFramework.PeopleModel{} delegate: Rectangle { + id: delegateRoot height: Kirigami.Units.gridUnit * 3 width: Kirigami.Units.gridUnit * 10 @@ -150,16 +151,33 @@ Popup { color: "lightgrey" } - Text { + Column { + + width: parent.width + anchors { left: avatarPlaceholder.right - leftMargin: Kirigami.Units.smallSpacing + margins: Kirigami.Units.smallSpacing verticalCenter: parent.verticalCenter } - color: Kirigami.Theme.textColor - text: model.name + Text { + width: delegateRoot.width - avatarPlaceholder.width - Kirigami.Units.smallSpacing * 2 + + text: model.firstName + elide: Text.ElideRight + color: Kirigami.Theme.textColor + } + + Text { + width: delegateRoot.width - avatarPlaceholder.width - Kirigami.Units.smallSpacing * 2 + + text: model.lastName + elide: Text.ElideRight + color: Kirigami.Theme.textColor + } } + } } } } -- cgit v1.2.3