Skip to content

Commit

Permalink
Fix fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
neonman63 authored Oct 11, 2024
1 parent 75bfcb1 commit 9d2b9ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/file_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ namespace fs = std::experimental::filesystem;

#define THUMBSCALE = 0.78

LV_FONT_DECLARE(notosans_40);

FilePanel::FilePanel(lv_obj_t *parent)
: file_cont(lv_obj_create(parent))
, thumbnail(lv_img_create(file_cont))
Expand All @@ -26,6 +28,7 @@ FilePanel::FilePanel(lv_obj_t *parent)
lv_obj_set_width(fname_label, LV_PCT(90));
lv_label_set_long_mode(fname_label, LV_LABEL_LONG_SCROLL);
lv_obj_set_style_text_align(fname_label, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_set_style_text_font(fname_label, &notosans_40, LV_STATE_DEFAULT);


static lv_coord_t grid_main_row_dsc[] = {LV_GRID_FR(3), LV_GRID_FR(2), LV_GRID_TEMPLATE_LAST};
Expand Down
4 changes: 2 additions & 2 deletions src/main_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LV_IMG_DECLARE(bed);
LV_IMG_DECLARE(fan);
LV_IMG_DECLARE(heater);

LV_FONT_DECLARE(notosans_40);
LV_FONT_DECLARE(materialdesign_font_40);
#define MACROS_SYMBOL "\xF3\xB1\xB2\x83"
#define CONSOLE_SYMBOL "\xF3\xB0\x86\x8D"
#define TUNE_SYMBOL "\xF3\xB1\x95\x82"
Expand Down Expand Up @@ -141,7 +141,7 @@ void MainPanel::create_panel() {
lv_obj_set_style_bg_color(tab_btns, lv_palette_main(LV_PALETTE_GREY), LV_STATE_CHECKED | LV_PART_ITEMS);
lv_obj_set_style_outline_width(tab_btns, 0, LV_PART_ITEMS | LV_STATE_FOCUS_KEY | LV_STATE_FOCUS_KEY);
lv_obj_set_style_border_side(tab_btns, 0, LV_PART_ITEMS | LV_STATE_CHECKED);
lv_obj_set_style_text_font(tab_btns, &notosans_40, LV_STATE_DEFAULT);
lv_obj_set_style_text_font(tab_btns, &materialdesign_font_40, LV_STATE_DEFAULT);

// lv_obj_set_style_text_font(lv_scr_act(), LV_FONT_DEFAULT, 0);

Expand Down

0 comments on commit 9d2b9ce

Please sign in to comment.