summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package/contents/ui/FolderListView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kube-mail/package/contents/ui/FolderListView.qml')
-rw-r--r--applications/kube-mail/package/contents/ui/FolderListView.qml116
1 files changed, 0 insertions, 116 deletions
diff --git a/applications/kube-mail/package/contents/ui/FolderListView.qml b/applications/kube-mail/package/contents/ui/FolderListView.qml
deleted file mode 100644
index 1934932c..00000000
--- a/applications/kube-mail/package/contents/ui/FolderListView.qml
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * Copyright (C) 2015 Michael Bohlender <michael.bohlender@kdemail.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18import QtQuick 2.4
19import QtQuick.Controls 1.4
20import QtQuick.Controls.Styles 1.4
21import QtQuick.Layouts 1.1
22
23import org.kde.plasma.core 2.0 as PlasmaCore
24import org.kde.plasma.components 2.0 as PlasmaComponents
25
26import org.kde.kube.mail 1.0 as Mail
27
28Item {
29 id: root
30 property variant currentFolder
31 SystemPalette { id: colorPalette; colorGroup: SystemPalette.Active }
32
33 Item {
34 id: searchBox
35
36 width: root.width
37 height: unit.size * 10
38
39 TextField {
40 anchors. centerIn: parent
41
42 width: parent.width * 0.9
43
44 placeholderText: "Search all email..."
45 }
46 }
47
48 TreeView {
49 id: treeView
50 anchors {
51 top: searchBox.bottom
52 left: parent.left
53 right: parent.right
54 bottom: parent.bottom
55 }
56 TableViewColumn {
57 title: "Name"
58 role: "name"
59 width: treeView.width - 5
60 }
61 model: Mail.FolderListModel { id: folderListModel }
62 onCurrentIndexChanged: {
63 model.fetchMore(currentIndex)
64 root.currentFolder = model.data(currentIndex, Mail.FolderListModel.DomainObject)
65 }
66 backgroundVisible: false
67 headerVisible: false
68 style: TreeViewStyle {
69 activateItemOnSingleClick: true
70 rowDelegate: Rectangle {
71 height: unit.size * 10
72 color: "transparent"
73 }
74 itemDelegate: Rectangle {
75 radius: 5
76 border.width: 1
77 border.color: "lightgrey"
78 color: styleData.selected ? colorPalette.highlight : colorPalette.button
79 PlasmaCore.IconItem {
80 id: iconItem
81 anchors {
82 verticalCenter: parent.verticalCenter
83 left: parent.left
84 leftMargin: unit.size * 3
85 }
86 source: model.icon
87 }
88 Label {
89 anchors {
90 verticalCenter: parent.verticalCenter
91 left: iconItem.right
92 leftMargin: unit.size * 3
93 }
94 renderType: Text.NativeRendering
95 text: styleData.value
96 font.pixelSize: 16
97 font.bold: true
98 color: styleData.selected ? colorPalette.highlightedText : colorPalette.text
99 }
100 }
101 branchDelegate: Item {
102 width: 16
103 height: 16
104 Text {
105 visible: styleData.column === 0 && styleData.hasChildren
106 text: styleData.isExpanded ? "\u25bc" : "\u25b6"
107 color: !control.activeFocus || styleData.selected ? styleData.textColor : "#666"
108 font.pointSize: 10
109 renderType: Text.NativeRendering
110 anchors.centerIn: parent
111 anchors.verticalCenterOffset: styleData.isExpanded ? 2 : 0
112 }
113 }
114 }
115 }
116}