Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@
#define LV_FONT_MONTSERRAT_42 0
#define LV_FONT_MONTSERRAT_44 0
#define LV_FONT_MONTSERRAT_46 0
#if WLED_SCREEN_WIDTH >= 480
#define LV_FONT_MONTSERRAT_48 1
#else
/* Only the shutdown countdown uses 48px; on 4MB CYDs the ~97KB font overflows
* the 1.69MiB OTA app slot, so small screens fall back to montserrat_20. */
#define LV_FONT_MONTSERRAT_48 0
#endif
#define LV_FONT_MONTSERRAT_12_SUBPX 0
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0
Expand Down
4 changes: 4 additions & 0 deletions src/ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ void startShutdownUi() {
shutdown_countdown_label = lv_label_create(shutdown_overlay);
lv_label_set_text(shutdown_countdown_label, "10");
lv_obj_set_style_text_color(shutdown_countdown_label, lv_color_hex(kColorText), LV_PART_MAIN);
#if LV_FONT_MONTSERRAT_48
lv_obj_set_style_text_font(shutdown_countdown_label, &lv_font_montserrat_48, LV_PART_MAIN);
#else
lv_obj_set_style_text_font(shutdown_countdown_label, &lv_font_montserrat_20, LV_PART_MAIN);
#endif
lv_obj_set_style_text_align(shutdown_countdown_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
lv_obj_set_size(shutdown_countdown_label, LV_PCT(100), 64);

Expand Down