diff options
Diffstat (limited to 'framework/qml/FolderListView.qml')
-rw-r--r-- | framework/qml/FolderListView.qml | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml index 25c6cbe5..a24a9ff6 100644 --- a/framework/qml/FolderListView.qml +++ b/framework/qml/FolderListView.qml | |||
@@ -30,6 +30,33 @@ Kube.TreeView { | |||
30 | Controls1.TableViewColumn { | 30 | Controls1.TableViewColumn { |
31 | title: "Name" | 31 | title: "Name" |
32 | role: "name" | 32 | role: "name" |
33 | delegate: Item { | ||
34 | DropArea { | ||
35 | anchors.fill: parent | ||
36 | Rectangle { | ||
37 | anchors.fill: parent | ||
38 | color: Kube.Colors.viewBackgroundColor | ||
39 | opacity: 0.3 | ||
40 | visible: parent.containsDrag | ||
41 | } | ||
42 | onDropped: { | ||
43 | Kube.Fabric.postMessage(Kube.Messages.moveToFolder, {"mail": drop.source.mail, "folder": model.domainObject}) | ||
44 | drop.accept(Qt.MoveAction) | ||
45 | drop.source.visible = false | ||
46 | } | ||
47 | } | ||
48 | |||
49 | Kube.Label { | ||
50 | anchors { | ||
51 | verticalCenter: parent.verticalCenter | ||
52 | left: parent.left | ||
53 | right: parent.right | ||
54 | } | ||
55 | text: styleData.value | ||
56 | elide: Qt.ElideRight | ||
57 | color: model.hasNewData ? Kube.Colors.highlightColor : Kube.Colors.viewBackgroundColor | ||
58 | } | ||
59 | } | ||
33 | } | 60 | } |
34 | 61 | ||
35 | model: Kube.FolderListModel { | 62 | model: Kube.FolderListModel { |
@@ -43,11 +70,4 @@ Kube.TreeView { | |||
43 | Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder": model.data(index, Kube.FolderListModel.DomainObject), | 70 | Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder": model.data(index, Kube.FolderListModel.DomainObject), |
44 | "trash": model.data(index, Kube.FolderListModel.Trash)}); | 71 | "trash": model.data(index, Kube.FolderListModel.Trash)}); |
45 | } | 72 | } |
46 | |||
47 | |||
48 | onDropped: { | ||
49 | Kube.Fabric.postMessage(Kube.Messages.moveToFolder, {"mail": drop.source.mail, "folder": model.domainObject}) | ||
50 | drop.accept(Qt.MoveAction) | ||
51 | drop.source.visible = false | ||
52 | } | ||
53 | } | 73 | } |