This commit is contained in:
Ellis Judge 2024-09-30 00:34:33 -04:00 committed by GitHub
commit f6fcb62d98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View file

@ -295,9 +295,11 @@ void WatchFaceCasioStyleG7710::Refresh() {
if (heartbeatRunning.Get()) {
lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text);
lv_label_set_text_fmt(heartbeatValue, "%d", heartbeat.Get());
lv_obj_set_hidden(heartbeatIcon, false);
lv_obj_set_hidden(heartbeatValue, false);
} else {
lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x1B1B1B));
lv_label_set_text_static(heartbeatValue, "");
lv_obj_set_hidden(heartbeatIcon, true);
lv_obj_set_hidden(heartbeatValue, true);
}
lv_obj_realign(heartbeatIcon);

View file

@ -154,9 +154,11 @@ void WatchFaceDigital::Refresh() {
if (heartbeatRunning.Get()) {
lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xCE1B1B));
lv_label_set_text_fmt(heartbeatValue, "%d", heartbeat.Get());
lv_obj_set_hidden(heartbeatIcon, false);
lv_obj_set_hidden(heartbeatValue, false);
} else {
lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x1B1B1B));
lv_label_set_text_static(heartbeatValue, "");
lv_obj_set_hidden(heartbeatIcon, true);
lv_obj_set_hidden(heartbeatValue, true);
}
lv_obj_realign(heartbeatIcon);