From 9ab147575870f0303bb3dd36684e28f4afb27aca Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 28 Mar 2017 16:37:32 +0200 Subject: Outboxmodel status --- components/package/contents/ui/Outbox.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml index 6e29946b..1b48aa6f 100644 --- a/components/package/contents/ui/Outbox.qml +++ b/components/package/contents/ui/Outbox.qml @@ -86,9 +86,18 @@ Button { } text: model.subject - //FIXME use theme color - color: model.status == "error" ? KubeTheme.Colors.warningColor : KubeTheme.Colors.textColor - opacity: model.status == "sent" ? 0.5 : 1 + color: KubeTheme.Colors.textColor + opacity: 1 + states: [ + State { + name: "inprogress"; when: model.status == KubeFramework.OutboxModel.InProgressStatus + PropertyChanges { target: subjectLabel; text: "Sending: " + model.subject } + }, + State { + name: "error"; when: model.status == KubeFramework.OutboxModel.ErrorStatus + PropertyChanges { target: subjectLabel; color: KubeTheme.Colors.warningColor } + } + ] } } -- cgit v1.2.3