mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
WatchFaces: Remove heart rate icon and value when heart rate is not running
Requested in issue #1165
This commit is contained in:
parent
782ef7902f
commit
b3eb81818a
|
@ -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);
|
||||
|
|
|
@ -138,9 +138,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);
|
||||
|
|
Loading…
Reference in a new issue