summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/package/contents/ui/FolderListView.qml63
1 files changed, 61 insertions, 2 deletions
diff --git a/components/package/contents/ui/FolderListView.qml b/components/package/contents/ui/FolderListView.qml
index 41f152de..936303be 100644
--- a/components/package/contents/ui/FolderListView.qml
+++ b/components/package/contents/ui/FolderListView.qml
@@ -25,25 +25,84 @@ import org.kde.kirigami 1.0 as Kirigami
25 25
26import org.kube.framework.domain 1.0 as KubeFramework 26import org.kube.framework.domain 1.0 as KubeFramework
27 27
28Item { 28Rectangle {
29 id: root 29 id: root
30 30
31 property variant currentFolder 31 property variant currentFolder
32 property variant accountId 32 property variant accountId
33 33
34 color: Kirigami.Theme.textColor
35
34 TreeView { 36 TreeView {
35 anchors.fill: parent
36 id: treeView 37 id: treeView
38
39 anchors {
40 top: parent.top
41 left: parent.left
42 right: parent.right
43 }
44
45 height: parent.height
46
37 TableViewColumn { 47 TableViewColumn {
38 title: "Name" 48 title: "Name"
39 role: "name" 49 role: "name"
40 } 50 }
51
41 model: KubeFramework.FolderListModel { id: folderListModel} //; accountId: wrapper.accountId } 52 model: KubeFramework.FolderListModel { id: folderListModel} //; accountId: wrapper.accountId }
53
42 onCurrentIndexChanged: { 54 onCurrentIndexChanged: {
43 model.fetchMore(currentIndex) 55 model.fetchMore(currentIndex)
44 root.currentFolder = model.data(currentIndex, KubeFramework.FolderListModel.DomainObject) 56 root.currentFolder = model.data(currentIndex, KubeFramework.FolderListModel.DomainObject)
45 } 57 }
58
46 alternatingRowColors: false 59 alternatingRowColors: false
47 headerVisible: false 60 headerVisible: false
61
62 style: TreeViewStyle {
63
64 rowDelegate: Rectangle {
65 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
66
67 height: Kirigami.Units.gridUnit * 2
68 width: 20
69
70 }
71
72 branchDelegate: Item {
73
74 width: 16; height: 16
75
76 Text {
77
78 anchors.centerIn: parent
79
80 color: Kirigami.Theme.viewBackgroundColor
81 text: styleData.isExpanded ? "-" : "+"
82 }
83
84 //radius: styleData.isExpanded ? 0 : 100
85 }
86
87 itemDelegate: Rectangle {
88
89 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
90
91 Text {
92 anchors {
93 verticalCenter: parent.verticalCenter
94 left: parent.left
95 leftMargin: Kirigami.Units.smallSpacing
96 }
97
98 text: "#" + styleData.value
99
100 color: Kirigami.Theme.viewBackgroundColor
101 }
102 }
103
104 backgroundColor: Kirigami.Theme.textColor
105 highlightedTextColor: Kirigami.Theme.highlightedTextColor
106 }
48 } 107 }
49} 108}