diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-27 09:43:37 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-27 09:43:37 +0200 |
commit | 5f1cf5b7926c568998f213beba9d7932ef7742ef (patch) | |
tree | eea6dbe854c7161dbf8d28ca6bbc0e0b8b7021de /components/mail/contents | |
parent | 2b0278a02b8bb5de9da79de395942c55449c1c59 (diff) | |
download | kube-5f1cf5b7926c568998f213beba9d7932ef7742ef.tar.gz kube-5f1cf5b7926c568998f213beba9d7932ef7742ef.zip |
Use states for the account status icon
Diffstat (limited to 'components/mail/contents')
-rw-r--r-- | components/mail/contents/ui/Mail.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml index c5078877..0643287f 100644 --- a/components/mail/contents/ui/Mail.qml +++ b/components/mail/contents/ui/Mail.qml | |||
@@ -291,9 +291,24 @@ Controls2.ApplicationWindow { | |||
291 | } | 291 | } |
292 | 292 | ||
293 | ToolButton { | 293 | ToolButton { |
294 | visible: model.showStatus | 294 | id: statusIcon |
295 | iconName: model.statusIcon | 295 | visible: false |
296 | iconName: "" | ||
296 | enabled: false | 297 | enabled: false |
298 | states: [ | ||
299 | State { | ||
300 | name: "busy"; when: model.status == KubeAccountsFramework.AccountsModel.BusyStatus | ||
301 | PropertyChanges { target: statusIcon; iconName: "view-refresh"; visible: true } | ||
302 | }, | ||
303 | State { | ||
304 | name: "error"; when: model.status == KubeAccountsFramework.AccountsModel.ErrorStatus | ||
305 | PropertyChanges { target: statusIcon; iconName: "emblem-error"; visible: true } | ||
306 | }, | ||
307 | State { | ||
308 | name: "checkmark"; when: model.status == KubeAccountsFramework.AccountsModel.ConnectedStatus | ||
309 | PropertyChanges { target: statusIcon; iconName: "checkmark"; visible: true } | ||
310 | } | ||
311 | ] | ||
297 | } | 312 | } |
298 | } | 313 | } |
299 | } | 314 | } |