diff options
Diffstat (limited to 'framework/qml/Outbox.qml')
-rw-r--r-- | framework/qml/Outbox.qml | 38 |
1 files changed, 14 insertions, 24 deletions
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 | |||
25 | import org.kube.framework 1.0 as Kube | 25 | import org.kube.framework 1.0 as Kube |
26 | 26 | ||
27 | 27 | ||
28 | Rectangle { | 28 | Controls.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 |