diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:29:17 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:29:17 -0600 |
commit | 2844ef37db4c498f39ba9804483831a27b8aa412 (patch) | |
tree | 3291d2292b7751537c1d4ddb67e1717f479e85fd | |
parent | 633eed6bb6bc2251cfb324d8017279bee14578b0 (diff) | |
download | kube-2844ef37db4c498f39ba9804483831a27b8aa412.tar.gz kube-2844ef37db4c498f39ba9804483831a27b8aa412.zip |
Ensure the right button is always checked.
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index ae7269f1..518b0c9c 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -141,6 +141,7 @@ Controls2.ApplicationWindow { | |||
141 | } | 141 | } |
142 | 142 | ||
143 | Kube.IconButton { | 143 | Kube.IconButton { |
144 | id: mailButton | ||
144 | iconName: Kube.Icons.mail_inverted | 145 | iconName: Kube.Icons.mail_inverted |
145 | onClicked: kubeViews.setMailView() | 146 | onClicked: kubeViews.setMailView() |
146 | activeFocusOnTab: true | 147 | activeFocusOnTab: true |
@@ -151,6 +152,7 @@ Controls2.ApplicationWindow { | |||
151 | } | 152 | } |
152 | 153 | ||
153 | Kube.IconButton { | 154 | Kube.IconButton { |
155 | id: peopleButton | ||
154 | iconName: Kube.Icons.user_inverted | 156 | iconName: Kube.Icons.user_inverted |
155 | onClicked: kubeViews.setPeopleView() | 157 | onClicked: kubeViews.setPeopleView() |
156 | activeFocusOnTab: true | 158 | activeFocusOnTab: true |
@@ -178,6 +180,7 @@ Controls2.ApplicationWindow { | |||
178 | } | 180 | } |
179 | 181 | ||
180 | Kube.IconButton { | 182 | Kube.IconButton { |
183 | id: logButton | ||
181 | iconName: Kube.Icons.error_inverted | 184 | iconName: Kube.Icons.error_inverted |
182 | onClicked: kubeViews.setLogView() | 185 | onClicked: kubeViews.setLogView() |
183 | activeFocusOnTab: true | 186 | activeFocusOnTab: true |
@@ -187,6 +190,7 @@ Controls2.ApplicationWindow { | |||
187 | } | 190 | } |
188 | 191 | ||
189 | Kube.IconButton { | 192 | Kube.IconButton { |
193 | id: accountsButton | ||
190 | iconName: Kube.Icons.menu_inverted | 194 | iconName: Kube.Icons.menu_inverted |
191 | onClicked: kubeViews.setAccountsView() | 195 | onClicked: kubeViews.setAccountsView() |
192 | activeFocusOnTab: true | 196 | activeFocusOnTab: true |
@@ -213,19 +217,23 @@ Controls2.ApplicationWindow { | |||
213 | 217 | ||
214 | //TODO replacing here while a composer is open is destructive | 218 | //TODO replacing here while a composer is open is destructive |
215 | function setPeopleView() { | 219 | function setPeopleView() { |
220 | peopleButton.checked = true | ||
216 | if (currentItem != peopleView) { | 221 | if (currentItem != peopleView) { |
217 | kubeViews.replace(null, peopleView, Controls2.StackView.Immediate) | 222 | kubeViews.replace(null, peopleView, Controls2.StackView.Immediate) |
218 | } | 223 | } |
219 | } | 224 | } |
220 | function setMailView() { | 225 | function setMailView() { |
226 | mailButton.checked = true | ||
221 | if (currentItem != mailView) { | 227 | if (currentItem != mailView) { |
222 | kubeViews.replace(null, mailView, Controls2.StackView.Immediate) | 228 | kubeViews.replace(null, mailView, Controls2.StackView.Immediate) |
223 | } | 229 | } |
224 | } | 230 | } |
225 | function setAccountsView() { | 231 | function setAccountsView() { |
232 | accountsButton.checked = true | ||
226 | kubeViews.push(accountsView, {}, Controls2.StackView.Immediate) | 233 | kubeViews.push(accountsView, {}, Controls2.StackView.Immediate) |
227 | } | 234 | } |
228 | function setLogView() { | 235 | function setLogView() { |
236 | logButton.checked = true | ||
229 | if (currentItem != logView) { | 237 | if (currentItem != logView) { |
230 | kubeViews.replace(null, logView, Controls2.StackView.Immediate) | 238 | kubeViews.replace(null, logView, Controls2.StackView.Immediate) |
231 | } | 239 | } |