summaryrefslogtreecommitdiffstats
path: root/components/package
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-27 09:43:37 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-27 09:43:37 +0200
commit5f1cf5b7926c568998f213beba9d7932ef7742ef (patch)
treeeea6dbe854c7161dbf8d28ca6bbc0e0b8b7021de /components/package
parent2b0278a02b8bb5de9da79de395942c55449c1c59 (diff)
downloadkube-5f1cf5b7926c568998f213beba9d7932ef7742ef.tar.gz
kube-5f1cf5b7926c568998f213beba9d7932ef7742ef.zip
Use states for the account status icon
Diffstat (limited to 'components/package')
-rw-r--r--components/package/contents/ui/AccountSwitcher.qml19
1 files changed, 17 insertions, 2 deletions
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 {