summaryrefslogtreecommitdiffstats
path: root/framework/qml/FolderListView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-15 16:47:09 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-15 20:15:03 +0200
commitae949b01fd512ccc4c9f9d1c7f1eefa2fc34e1e0 (patch)
treeba0c40fdd1fb5e6b38336fd9f7282ce0da333755 /framework/qml/FolderListView.qml
parentd853c05bbcbb34d919afd6326bcadca6e40a60e4 (diff)
downloadkube-ae949b01fd512ccc4c9f9d1c7f1eefa2fc34e1e0.tar.gz
kube-ae949b01fd512ccc4c9f9d1c7f1eefa2fc34e1e0.zip
Put the TreeView into an extra flickable
...so it becomes scrollable just like the rest. Because the TreeView derives from ScrollView we can't just use the regular approach of making the flickable suck less at scrolling. Instead we expand the treeview to maximum length and wrap it in an extra Flickable that we can then handle with the ScrollHelper. This results in the treeview to have the same scrolling behvaiour as everything else.
Diffstat (limited to 'framework/qml/FolderListView.qml')
-rw-r--r--framework/qml/FolderListView.qml12
1 files changed, 5 insertions, 7 deletions
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml
index 7800e98d..5e2f41fc 100644
--- a/framework/qml/FolderListView.qml
+++ b/framework/qml/FolderListView.qml
@@ -18,25 +18,23 @@
18*/ 18*/
19 19
20import QtQuick 2.4 20import QtQuick 2.4
21import QtQuick.Controls 1.4 21import QtQuick.Controls 2
22import QtQuick.Controls.Styles 1.4 22import QtQuick.Controls 1 as Controls1
23import QtQuick.Layouts 1.1
24import QtQml.Models 2.2
25 23
26import org.kube.framework 1.0 as Kube 24import org.kube.framework 1.0 as Kube
27 25
28Kube.TreeView { 26Kube.TreeView {
29 id: treeView 27 id: root
30 property variant accountId 28 property variant accountId
31 29
32 TableViewColumn { 30 Controls1.TableViewColumn {
33 title: "Name" 31 title: "Name"
34 role: "name" 32 role: "name"
35 } 33 }
36 34
37 model: Kube.FolderListModel { 35 model: Kube.FolderListModel {
38 id: folderListModel 36 id: folderListModel
39 accountId: treeView.accountId 37 accountId: root.accountId
40 } 38 }
41 39
42 onActivated: { 40 onActivated: {