summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-21 18:16:28 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-21 18:16:53 +0200
commit68ed477e34756beb5b152f8077c2e2527bba4708 (patch)
treeb3de8ef3debe5ce808f01c62b415881199c18837 /framework/qml
parentc766d912d7cdd899766f55925a016d25c7f66b31 (diff)
downloadkube-68ed477e34756beb5b152f8077c2e2527bba4708.tar.gz
kube-68ed477e34756beb5b152f8077c2e2527bba4708.zip
The outbox is back
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/Icons.qml2
-rw-r--r--framework/qml/Outbox.qml38
2 files changed, 16 insertions, 24 deletions
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index 8d63f021..ee706d95 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -39,6 +39,8 @@ Item {
39 property string moveToTrash: "edit-delete" 39 property string moveToTrash: "edit-delete"
40 property string edit: "document-edit" 40 property string edit: "document-edit"
41 property string replyToSender: "mail-reply-sender" 41 property string replyToSender: "mail-reply-sender"
42 property string outbox: "mail-folder-outbox"
43 property string outbox_inverted: "mail-folder-outbox-inverted"
42 44
43 property string menu_inverted: "application-menu-inverted" 45 property string menu_inverted: "application-menu-inverted"
44 property string user_inverted: "im-user-inverted" 46 property string user_inverted: "im-user-inverted"
diff --git a/framework/qml/Outbox.qml b/framework/qml/Outbox.qml
index 43d0f102..fc960667 100644
--- a/framework/qml/Outbox.qml
+++ b/framework/qml/Outbox.qml
@@ -25,7 +25,7 @@ import org.kde.kirigami 1.0 as Kirigami
25import org.kube.framework 1.0 as Kube 25import org.kube.framework 1.0 as Kube
26 26
27 27
28Rectangle { 28Controls.ToolButton {
29 id: root 29 id: root
30 30
31 visible: outboxModel.count > 0 31 visible: outboxModel.count > 0
@@ -36,42 +36,32 @@ Rectangle {
36 Kube.OutboxModel { 36 Kube.OutboxModel {
37 id: outboxModel 37 id: outboxModel
38 } 38 }
39 iconName: Kube.Icons.outbox
39 40
40 states: [ 41 states: [
41 State { 42 State {
42 name: "busy"; when: outboxModel.status == Kube.OutboxModel.InProgressStatus 43 name: "busy"; when: outboxModel.status == Kube.OutboxModel.InProgressStatus
43 PropertyChanges { target: icon; iconName: Kube.Icons.busy_inverted } 44 PropertyChanges { target: root; iconName: Kube.Icons.busy_inverted }
44 }, 45 },
45 State { 46 State {
46 name: "error"; when: outboxModel.status == Kube.OutboxModel.ErrorStatus 47 name: "error"; when: outboxModel.status == Kube.OutboxModel.ErrorStatus
47 PropertyChanges { target: icon; iconName: Kube.Icons.error_inverted } 48 PropertyChanges { target: root; iconName: Kube.Icons.error_inverted }
48 } 49 }
49 ] 50 ]
50 51
51 color: Kube.Colors.textColor 52 Kube.Label {
52 clip: true 53 id: text
53 54 anchors {
54 Row { 55 right: parent.right
55 anchors.centerIn: parent 56 bottom: parent.bottom
56 spacing: Kube.Units.smallSpacing
57 Kube.Label {
58 id: text
59 anchors.verticalCenter: parent.verticalCenter
60 text: outboxModel.count > 0 ? "Pending (" + outboxModel.count + ")" : "Outbox"
61 color: Kube.Colors.highlightedTextColor
62 }
63 Icon {
64 id: icon
65 anchors.verticalCenter: parent.verticalCenter
66 iconName: ""
67 visible: iconName != ""
68 } 57 }
58 width: Kube.Units.smallSpacing
59 text: outboxModel.count
60 color: Kube.Colors.disabledTextColor
61 font.pointSize: 9
69 } 62 }
70 63
71 MouseArea { 64 onClicked: dialog.open()
72 anchors.fill: parent
73 onClicked: dialog.open()
74 }
75 65
76 Kube.Popup { 66 Kube.Popup {
77 id: dialog 67 id: dialog