hide alarm depending on option status

This commit is contained in:
Eve C 2024-07-15 16:39:17 +02:00
parent 59f9a5eaff
commit 6ce316dc06
2 changed files with 10 additions and 1 deletions

View file

@ -259,6 +259,7 @@ WatchFaceInfineat::WatchFaceInfineat(Controllers::DateTime& dateTimeController,
lv_obj_set_hidden(alarmIcon, true); lv_obj_set_hidden(alarmIcon, true);
lv_obj_set_hidden(labelTimeAmPmAlarm, true); lv_obj_set_hidden(labelTimeAmPmAlarm, true);
} }
stepValue = lv_label_create(lv_scr_act(), nullptr); stepValue = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, grayColor); lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, grayColor);
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko); lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);

View file

@ -284,8 +284,16 @@ WatchFaceMeow::WatchFaceMeow(Controllers::DateTime& dateTimeController,
// symbol // symbol
alarmIcon = lv_label_create(lv_scr_act(), nullptr); alarmIcon = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(alarmIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, pinkColor); lv_obj_set_style_local_text_color(alarmIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, pinkColor);
lv_label_set_text_static(alarmIcon, Symbols::paw); lv_label_set_text_static(alarmIcon, Symbols::zzz);
lv_obj_align(alarmIcon, labelAlarm, LV_ALIGN_OUT_LEFT_MID, -3, 0); lv_obj_align(alarmIcon, labelAlarm, LV_ALIGN_OUT_LEFT_MID, -3, 0);
// don't show the icons jsut set if we don't show alarm status
if (!settingsController.GetInfineatShowAlarmStatus()) {
lv_obj_set_hidden(labelAlarm, true);
lv_obj_set_hidden(alarmIcon, true);
lv_obj_set_hidden(labelTimeAmPmAlarm, true);
}
stepValue = lv_label_create(lv_scr_act(), nullptr); stepValue = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, pinkColor); lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, pinkColor);
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko); lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);