diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-15 17:48:01 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-15 17:48:01 +0200 |
commit | 63f53ca41dc068241d7a1bdbf05c5036fe70dbe7 (patch) | |
tree | c0c4097d80cd797261ef686de450d8769e64bdb0 | |
parent | 618e415be858313404d1217cbc6c2d14480889a5 (diff) |
Window: Use a rotating arrow as the download animation
-rw-r--r-- | src/ui/window.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index d2ec6822..986cfe69 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -194,6 +194,44 @@ static const iMenuItem identityButtonMenuItems_[] = { | |||
194 | 194 | ||
195 | static const char *reloadCStr_ = "\U0001f503"; | 195 | static const char *reloadCStr_ = "\U0001f503"; |
196 | static const char *stopSeqCStr_[] = { | 196 | static const char *stopSeqCStr_[] = { |
197 | /* Rotating arrow */ | ||
198 | uiTextCaution_ColorEscape "\U00002b62", | ||
199 | uiTextCaution_ColorEscape "\U00002b68", | ||
200 | uiTextCaution_ColorEscape "\U00002b63", | ||
201 | uiTextCaution_ColorEscape "\U00002b69", | ||
202 | uiTextCaution_ColorEscape "\U00002b60", | ||
203 | uiTextCaution_ColorEscape "\U00002b66", | ||
204 | uiTextCaution_ColorEscape "\U00002b61", | ||
205 | uiTextCaution_ColorEscape "\U00002b67", | ||
206 | #if 0 | ||
207 | /* Star */ | ||
208 | uiTextCaution_ColorEscape "\u2bcc", | ||
209 | uiTextCaution_ColorEscape "\u2bcd", | ||
210 | uiTextCaution_ColorEscape "\u2bcc", | ||
211 | uiTextCaution_ColorEscape "\u2bcd", | ||
212 | uiTextCaution_ColorEscape "\u2bcc", | ||
213 | uiTextCaution_ColorEscape "\u2bcd", | ||
214 | uiTextCaution_ColorEscape "\u2bce", | ||
215 | uiTextCaution_ColorEscape "\u2bcf", | ||
216 | uiTextCaution_ColorEscape "\u2bce", | ||
217 | uiTextCaution_ColorEscape "\u2bcf", | ||
218 | uiTextCaution_ColorEscape "\u2bce", | ||
219 | uiTextCaution_ColorEscape "\u2bcf", | ||
220 | #endif | ||
221 | #if 0 | ||
222 | /* Pulsing circle */ | ||
223 | uiTextCaution_ColorEscape "\U0001f785", | ||
224 | uiTextCaution_ColorEscape "\U0001f786", | ||
225 | uiTextCaution_ColorEscape "\U0001f787", | ||
226 | uiTextCaution_ColorEscape "\U0001f788", | ||
227 | uiTextCaution_ColorEscape "\U0001f789", | ||
228 | uiTextCaution_ColorEscape "\U0001f789", | ||
229 | uiTextCaution_ColorEscape "\U0001f788", | ||
230 | uiTextCaution_ColorEscape "\U0001f787", | ||
231 | uiTextCaution_ColorEscape "\U0001f786", | ||
232 | #endif | ||
233 | #if 0 | ||
234 | /* Dancing dots */ | ||
197 | uiTextCaution_ColorEscape "\U0001fb00", | 235 | uiTextCaution_ColorEscape "\U0001fb00", |
198 | uiTextCaution_ColorEscape "\U0001fb01", | 236 | uiTextCaution_ColorEscape "\U0001fb01", |
199 | uiTextCaution_ColorEscape "\U0001fb07", | 237 | uiTextCaution_ColorEscape "\U0001fb07", |
@@ -224,6 +262,7 @@ static const char *stopSeqCStr_[] = { | |||
224 | uiTextCaution_ColorEscape "\U0001fb1e", | 262 | uiTextCaution_ColorEscape "\U0001fb1e", |
225 | uiTextCaution_ColorEscape "\U0001fb07", | 263 | uiTextCaution_ColorEscape "\U0001fb07", |
226 | uiTextCaution_ColorEscape "\U0001fb03", | 264 | uiTextCaution_ColorEscape "\U0001fb03", |
265 | #endif | ||
227 | }; | 266 | }; |
228 | 267 | ||
229 | static void updateNavBarIdentity_(iWidget *navBar) { | 268 | static void updateNavBarIdentity_(iWidget *navBar) { |
@@ -241,8 +280,8 @@ static void updateNavBarIdentity_(iWidget *navBar) { | |||
241 | setFlags_Widget(as_Widget(idItem), disabled_WidgetFlag, !ident); | 280 | setFlags_Widget(as_Widget(idItem), disabled_WidgetFlag, !ident); |
242 | } | 281 | } |
243 | 282 | ||
244 | static const int loadAnimIntervalMs_ = 200; | 283 | static const int loadAnimIntervalMs_ = 266; |
245 | static int loadAnimIndex_ = 0; | 284 | static int loadAnimIndex_ = 0; |
246 | 285 | ||
247 | static const char *loadAnimationCStr_(void) { | 286 | static const char *loadAnimationCStr_(void) { |
248 | return stopSeqCStr_[loadAnimIndex_ % iElemCount(stopSeqCStr_)]; | 287 | return stopSeqCStr_[loadAnimIndex_ % iElemCount(stopSeqCStr_)]; |