Feature: 支持 LVGL 作为嵌入式显示屏的底层。 #7

Merged
Ivan merged 5 commits from feature/lvgl into master 2023-05-03 21:04:25 +08:00
Showing only changes of commit ca9e25f40c - Show all commits

View File

@ -185,7 +185,7 @@ static void gui_bar_value_update_cb(lv_event_t *e) {
lv_draw_label_dsc_t label_dsc;
lv_draw_label_dsc_init(&label_dsc);
label_dsc.font = &lv_font_montserrat_8;
label_dsc.font = &lv_font_montserrat_10;
char buf[8];
lv_snprintf(buf, sizeof(buf), "%ld", lv_bar_get_value(obj));
@ -209,8 +209,6 @@ static void gui_bar_value_update_cb(lv_event_t *e) {
LV_PART_MAIN);
}
ESP_LOGI(GUI_TAG, "value_setting_value_label: %s", buf);
lv_obj_align(value_setting_value_label, LV_ALIGN_LEFT_MID, txt_x, 0);
lv_label_set_text(value_setting_value_label, buf);
lv_obj_set_width(value_setting_value_label, txt_size.x);
@ -252,7 +250,7 @@ static void gui_create_value_setting_panel() {
value_setting_value_label = lv_label_create(value_setting_bar);
lv_obj_align(value_setting_value_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_text_font(value_setting_value_label, &lv_font_montserrat_8,
lv_obj_set_style_text_font(value_setting_value_label, &lv_font_montserrat_10,
LV_PART_MAIN);
}