From 7339cc0c0a0c63576f38f0bc96c15f28967b92d1 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 30 Mar 2017 13:51:09 +0200 Subject: Indicate if the outbox is not empty ..we could of course also just hide the outbox if empty. --- components/package/contents/ui/Outbox.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'components/package/contents') diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml index 1b48aa6f..1f0400d3 100644 --- a/components/package/contents/ui/Outbox.qml +++ b/components/package/contents/ui/Outbox.qml @@ -40,6 +40,17 @@ Button { id: outboxController } + KubeFramework.OutboxModel { + id: outboxModel + } + + states: [ + State { + name: "noempty"; when: outboxModel.count > 0 + PropertyChanges { target: root; text: "outbox (" + outboxModel.count + ")" } + } + ] + Popup { id: dialog @@ -65,7 +76,7 @@ Button { width: parent.width height: count * Kirigami.Units.gridUnit * 3 - model: KubeFramework.OutboxModel {} + model: outboxModel delegate: Rectangle { id: delegateRoot -- cgit v1.2.3