diff options
Diffstat (limited to 'applications/kube-mail-mobile/FolderListView.qml')
-rw-r--r-- | applications/kube-mail-mobile/FolderListView.qml | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/applications/kube-mail-mobile/FolderListView.qml b/applications/kube-mail-mobile/FolderListView.qml deleted file mode 100644 index 1baa03b6..00000000 --- a/applications/kube-mail-mobile/FolderListView.qml +++ /dev/null | |||
@@ -1,121 +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 | |||
18 | import QtQuick 2.4 | ||
19 | import QtQuick.Controls 1.3 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | |||
27 | //toolbar | ||
28 | ToolBar { | ||
29 | id: toolBar | ||
30 | |||
31 | RowLayout { | ||
32 | |||
33 | width: parent.width | ||
34 | |||
35 | spacing: unit.width * 5 | ||
36 | |||
37 | ToolButton { | ||
38 | anchors.right: parent.right | ||
39 | |||
40 | iconName: "system-search" | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | //main content | ||
46 | ListView { | ||
47 | |||
48 | anchors { | ||
49 | top: toolBar.bottom | ||
50 | right: parent.right | ||
51 | left: parent.left | ||
52 | bottom: parent.bottom | ||
53 | } | ||
54 | |||
55 | clip: true | ||
56 | |||
57 | model: FolderListModel { } | ||
58 | |||
59 | |||
60 | delegate: Item { | ||
61 | |||
62 | height: unit.width * 20 | ||
63 | width: parent.width | ||
64 | |||
65 | MouseArea { | ||
66 | id: mouseArea | ||
67 | |||
68 | anchors.fill: parent | ||
69 | |||
70 | onClicked: { | ||
71 | stack.push({"item": Qt.resolvedUrl("MailListView.qml"), properties: {stack: stack, folderId: model.name}}) | ||
72 | } | ||
73 | } | ||
74 | |||
75 | //background | ||
76 | Rectangle { | ||
77 | anchors.fill: parent | ||
78 | |||
79 | color: colorPalette.background | ||
80 | } | ||
81 | |||
82 | //clickColor | ||
83 | Rectangle { | ||
84 | id: clickColor | ||
85 | anchors.fill: parent | ||
86 | |||
87 | color: colorPalette.selected | ||
88 | opacity: 0.4 | ||
89 | |||
90 | visible: mouseArea.pressed | ||
91 | } | ||
92 | |||
93 | //FIXME without useing PlasmaComponents | ||
94 | ToolButton { | ||
95 | id: icon | ||
96 | |||
97 | anchors { | ||
98 | verticalCenter: parent.verticalCenter | ||
99 | left: parent.left | ||
100 | leftMargin: unit.width * 10 | ||
101 | } | ||
102 | |||
103 | iconName: model.icon | ||
104 | |||
105 | } | ||
106 | |||
107 | Label { | ||
108 | |||
109 | anchors{ | ||
110 | left: icon.right | ||
111 | leftMargin: unit.width * 15 | ||
112 | verticalCenter: icon.verticalCenter | ||
113 | } | ||
114 | |||
115 | text: model.name | ||
116 | |||
117 | font.weight: model.topLvl ? Font.DemiBold : Font.Normal | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | } | ||