aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConfuSomu2021-09-04 00:05:27 -0400
committerConfuSomu2021-09-04 00:05:27 -0400
commitc49e2896da986b37fbc01859c45c6bd41271fdd9 (patch)
treee347513971d47b3bab26fe55d46efd82448f88ac
parentb56a105886a85db4f4f8798fe04253c48ebeb225 (diff)
downloadpico-watch-c49e2896da986b37fbc01859c45c6bd41271fdd9.tar
pico-watch-c49e2896da986b37fbc01859c45c6bd41271fdd9.tar.gz
pico-watch-c49e2896da986b37fbc01859c45c6bd41271fdd9.zip
Improve UI by relocating elements
-rw-r--r--apps/main_clock/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/main_clock/main.cpp b/apps/main_clock/main.cpp
index 46f7d67..b4f4694 100644
--- a/apps/main_clock/main.cpp
+++ b/apps/main_clock/main.cpp
@@ -20,7 +20,7 @@ void app_main_clock::time_as_str(char *buf, uint buf_size, const datetime_t *t)
}
snprintf(buf,
buf_size,
- "%d:%02d:%02d ",
+ "%02d:%02d ",
hour, t->min, t->sec);
};
@@ -43,13 +43,16 @@ void app_main_clock::show_datetime(Api *app_api) {
// time
time_as_str(datetime_str, sizeof(datetime_buf), &t);
- app_api->display_write_string(0,10,3, datetime_str, FONT_12x16, 0, 1);
+ app_api->display_write_string(0,25,3, datetime_str, FONT_12x16, 0, 1);
+
+ snprintf(datetime_str, sizeof(datetime_buf), "%02d", t.sec);
+ app_api->display_write_string(0,87,4, datetime_str, FONT_8x8, 0, 1);
// for 12 hour time
if (!g_user.time_format) {
bool is_pm = !(t.hour < 12);
const char *indicator = is_pm? "PM" : "AM";
- app_api->display_write_string(0,100,2, indicator, FONT_8x8, 0, 1);
+ app_api->display_write_string(0,98,2, indicator, FONT_8x8, 0, 1);
}
// date