diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/mail/contents/ui/Mail.qml | 19 | ||||
-rw-r--r-- | components/package/contents/ui/AccountSwitcher.qml | 19 |
2 files changed, 34 insertions, 4 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 | } |
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml index 74b6c1ff..8e82dc03 100644 --- a/components/package/contents/ui/AccountSwitcher.qml +++ b/components/package/contents/ui/AccountSwitcher.qml | |||
@@ -163,9 +163,24 @@ Controls.ToolButton { | |||
163 | } | 163 | } |
164 | 164 | ||
165 | Controls.ToolButton { | 165 | Controls.ToolButton { |
166 | id: statusIcon | ||
167 | visible: false | ||
168 | iconName: "" | ||
166 | enabled: false | 169 | enabled: false |
167 | visible: model.showStatus | 170 | states: [ |
168 | iconName: model.statusIcon | 171 | State { |
172 | name: "busy"; when: model.status == KubeAccountsFramework.AccountsModel.BusyStatus | ||
173 | PropertyChanges { target: statusIcon; iconName: "view-refresh"; visible: true } | ||
174 | }, | ||
175 | State { | ||
176 | name: "error"; when: model.status == KubeAccountsFramework.AccountsModel.ErrorStatus | ||
177 | PropertyChanges { target: statusIcon; iconName: "emblem-error"; visible: true } | ||
178 | }, | ||
179 | State { | ||
180 | name: "checkmark"; when: model.status == KubeAccountsFramework.AccountsModel.ConnectedStatus | ||
181 | PropertyChanges { target: statusIcon; iconName: "checkmark"; visible: true } | ||
182 | } | ||
183 | ] | ||
169 | } | 184 | } |
170 | } | 185 | } |
171 | Controls2.Button { | 186 | Controls2.Button { |