infineat: Remove use with builtin fonts
The watchface cannot be enabled without the correct font anyway.
This commit is contained in:
parent
52bc0cd623
commit
7bd215bc06
|
@ -104,40 +104,21 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|||
|
||||
timeContainer = lv_obj_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_bg_opa(timeContainer, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
|
||||
if (font_bebas != nullptr) {
|
||||
lv_obj_set_size(timeContainer, 185, 185);
|
||||
lv_obj_align(timeContainer, lv_scr_act(), LV_ALIGN_CENTER, 0, -10);
|
||||
} else {
|
||||
lv_obj_set_size(timeContainer, 110, 145);
|
||||
lv_obj_align(timeContainer, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
|
||||
}
|
||||
|
||||
labelHour = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
||||
lv_label_set_text_static(labelHour, "01");
|
||||
if (font_bebas != nullptr) {
|
||||
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
||||
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
||||
} else {
|
||||
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
||||
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 5);
|
||||
}
|
||||
|
||||
labelMinutes = lv_label_create(lv_scr_act(), nullptr);
|
||||
if (font_bebas != nullptr) {
|
||||
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
||||
} else {
|
||||
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
||||
}
|
||||
lv_label_set_text_static(labelMinutes, "00");
|
||||
lv_obj_align(labelMinutes, timeContainer, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
|
||||
|
||||
labelTimeAmPm = lv_label_create(lv_scr_act(), nullptr);
|
||||
if (font_teko != nullptr) {
|
||||
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
||||
} else {
|
||||
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
||||
}
|
||||
|
||||
lv_label_set_text_static(labelTimeAmPm, "");
|
||||
lv_obj_align(labelTimeAmPm, timeContainer, LV_ALIGN_OUT_RIGHT_TOP, 0, 15);
|
||||
|
@ -149,11 +130,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|||
|
||||
labelDate = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
||||
if (font_teko != nullptr) {
|
||||
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
||||
} else {
|
||||
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
||||
}
|
||||
lv_obj_align(labelDate, dateContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
||||
lv_label_set_text_static(labelDate, "Mon 01");
|
||||
|
||||
|
@ -164,11 +141,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|||
|
||||
stepValue = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
||||
if (font_teko != nullptr) {
|
||||
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
||||
} else {
|
||||
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
||||
}
|
||||
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 10, 0);
|
||||
lv_label_set_text_static(stepValue, "0");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user