summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/kube/contents/ui/AccountsView.qml45
1 files changed, 28 insertions, 17 deletions
diff --git a/components/kube/contents/ui/AccountsView.qml b/components/kube/contents/ui/AccountsView.qml
index b5d8d575..556e4b53 100644
--- a/components/kube/contents/ui/AccountsView.qml
+++ b/components/kube/contents/ui/AccountsView.qml
@@ -22,6 +22,8 @@ import QtQuick.Controls 1.3 as Controls
22import org.kube.framework 1.0 as Kube 22import org.kube.framework 1.0 as Kube
23import org.kube.components.accounts 1.0 as KubeAccounts 23import org.kube.components.accounts 1.0 as KubeAccounts
24 24
25import QtQuick.Templates 2.0 as T
26
25Rectangle { 27Rectangle {
26 color: Kube.Colors.backgroundColor 28 color: Kube.Colors.backgroundColor
27 29
@@ -64,31 +66,40 @@ Rectangle {
64 66
65 model: Kube.AccountsModel {} 67 model: Kube.AccountsModel {}
66 68
67 delegate: Rectangle { 69 delegate: T.ItemDelegate {
70 id: delegateRoot
71
68 height: Kube.Units.gridUnit * 3 72 height: Kube.Units.gridUnit * 3
69 width: listView.width 73 width: listView.width
70 74
71 border.color: Kube.Colors.buttonColor 75 onClicked: {
72 border.width: 1 76 edit.accountId = model.accountId
73 color: Kube.Colors.viewBackgroundColor 77 }
74 78
75 Kube.Label { 79 contentItem: Item {
76 anchors { 80 Kube.Label {
77 verticalCenter: parent.verticalCenter 81 anchors {
78 left: parent.left 82 verticalCenter: parent.verticalCenter
79 leftMargin: Kube.Units.largeSpacing 83 left: parent.left
84 leftMargin: Kube.Units.largeSpacing
85 }
86 width: parent.width - Kube.Units.largeSpacing * 2
87
88 text: model.name
89 color: edit.accountId == model.accountId ? Kube.Colors.highlightedTextColor : Kube.Colors.textColor
80 } 90 }
81 width: parent.width - Kube.Units.largeSpacing * 2
82
83 text: model.name
84 } 91 }
85 92
86 MouseArea { 93 background: Rectangle {
87 id: mouseArea 94 border.color: Kube.Colors.buttonColor
88 anchors.fill: parent 95 border.width: 1
96 color: Kube.Colors.viewBackgroundColor
89 97
90 onClicked: { 98 Rectangle {
91 edit.accountId = model.accountId 99 width: parent.width
100 height: parent.height
101 visible: edit.accountId == model.accountId
102 color: Kube.Colors.highlightColor
92 } 103 }
93 } 104 }
94 } 105 }