]> git.earman.xyz Git - sensor-watch.git/commitdiff
launcher: fix flickering in preferences widget
authorJoey Castillo <jose.castillo@gmail.com>
Mon, 4 Oct 2021 15:59:08 +0000 (11:59 -0400)
committerJoey Castillo <jose.castillo@gmail.com>
Mon, 4 Oct 2021 18:12:39 +0000 (14:12 -0400)
launcher/widgets/settings/preferences_widget.c

index 878b775b34d17449f7b8ad91941957faaca74118..7e583c813a2e4543956db5024fd194f9e199b283 100644 (file)
@@ -3,7 +3,7 @@
 #include "watch.h"
 
 #define PREFERENCES_WIDGET_NUM_PREFEFENCES (5)
-const char preferences_widget_titles[PREFERENCES_WIDGET_NUM_PREFEFENCES][11] = {"CL", "Bt  Beep", "SC", "Lt   grn", "Lt   red"};
+const char preferences_widget_titles[PREFERENCES_WIDGET_NUM_PREFEFENCES][11] = {"CL        ", "Bt  Beep  ", "SC        ", "Lt   grn  ", "Lt   red  "};
 
 void preferences_widget_setup(LauncherSettings *settings, void ** context_ptr) {
     (void) settings;
@@ -17,8 +17,6 @@ void preferences_widget_activate(LauncherSettings *settings, void *context) {
 }
 
 bool preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, void *context) {
-    (void) settings;
-    (void) context;
     printf("preferences_widget_loop\n");
     uint8_t current_page = *((uint8_t *)context);
     switch (event.bit.event_type) {
@@ -53,7 +51,6 @@ bool preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, vo
             break;
     }
 
-    watch_clear_display();
     watch_display_string((char *)preferences_widget_titles[current_page], 0);
 
     if (event.bit.subsecond % 2) return current_page <= 2;