summaryrefslogtreecommitdiffstats
path: root/framework/qml/FolderListView.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-04-21 13:05:40 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-04-21 13:05:40 +0200
commit1f0bc11f4fe1fb96d25f88fc01c7300e700a82b8 (patch)
treeb58e132f94789ec7744e6c4993307af39be914ce /framework/qml/FolderListView.qml
parent4a04da5998ee2748659d54ea3a5781d167e66808 (diff)
downloadkube-1f0bc11f4fe1fb96d25f88fc01c7300e700a82b8.tar.gz
kube-1f0bc11f4fe1fb96d25f88fc01c7300e700a82b8.zip
initial inline account switcher
Diffstat (limited to 'framework/qml/FolderListView.qml')
-rw-r--r--framework/qml/FolderListView.qml30
1 files changed, 3 insertions, 27 deletions
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml
index 11e29662..4082e08d 100644
--- a/framework/qml/FolderListView.qml
+++ b/framework/qml/FolderListView.qml
@@ -21,7 +21,6 @@ import QtQuick.Controls 1.4
21import QtQuick.Controls.Styles 1.4 21import QtQuick.Controls.Styles 1.4
22import QtQuick.Layouts 1.1 22import QtQuick.Layouts 1.1
23 23
24import org.kde.kirigami 1.0 as Kirigami
25import org.kube.framework 1.0 as Kube 24import org.kube.framework 1.0 as Kube
26 25
27Rectangle { 26Rectangle {
@@ -42,18 +41,6 @@ Rectangle {
42 } 41 }
43 } 42 }
44 43
45 Menu {
46 id: contextMenu
47 title: "Edit"
48
49 MenuItem {
50 text: "Synchronize"
51 onTriggered: {
52 folderController.synchronizeAction.execute()
53 }
54 }
55 }
56
57 TreeView { 44 TreeView {
58 id: treeView 45 id: treeView
59 46
@@ -80,29 +67,18 @@ Rectangle {
80 root.currentFolder = model.data(currentIndex, Kube.FolderListModel.DomainObject) 67 root.currentFolder = model.data(currentIndex, Kube.FolderListModel.DomainObject)
81 root.isTrashFolder = model.data(currentIndex, Kube.FolderListModel.Trash) 68 root.isTrashFolder = model.data(currentIndex, Kube.FolderListModel.Trash)
82 folderController.synchronizeAction.execute() 69 folderController.synchronizeAction.execute()
70 console.error(model.data)
83 } 71 }
84 72
85 alternatingRowColors: false 73 alternatingRowColors: false
86 headerVisible: false 74 headerVisible: false
87 75
88 MouseArea {
89 anchors.fill: parent
90 acceptedButtons: Qt.RightButton
91 onClicked: {
92 var index = parent.indexAt(mouse.x, mouse.y)
93 if (index.valid) {
94 folderController.folder = treeView.model.data(index, Kube.FolderListModel.DomainObject)
95 contextMenu.popup()
96 }
97 }
98 }
99
100 style: TreeViewStyle { 76 style: TreeViewStyle {
101 77
102 rowDelegate: Rectangle { 78 rowDelegate: Rectangle {
103 color: styleData.selected ? Kube.Colors.highlightColor : Kube.Colors.textColor 79 color: styleData.selected ? Kube.Colors.highlightColor : Kube.Colors.textColor
104 80
105 height: Kirigami.Units.gridUnit * 1.5 81 height: Kube.Units.gridUnit * 1.5
106 width: 20 82 width: 20
107 83
108 } 84 }
@@ -157,7 +133,7 @@ Rectangle {
157 Kube.Label { 133 Kube.Label {
158 anchors { 134 anchors {
159 verticalCenter: parent.verticalCenter 135 verticalCenter: parent.verticalCenter
160 leftMargin: Kirigami.Units.smallSpacing 136 leftMargin: Kube.Units.smallSpacing
161 } 137 }
162 138
163 text: styleData.value 139 text: styleData.value