chore: change bar value label font size.
This commit is contained in:
parent
27270c4f6a
commit
ca9e25f40c
@ -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_t label_dsc;
|
||||||
lv_draw_label_dsc_init(&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];
|
char buf[8];
|
||||||
lv_snprintf(buf, sizeof(buf), "%ld", lv_bar_get_value(obj));
|
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);
|
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_obj_align(value_setting_value_label, LV_ALIGN_LEFT_MID, txt_x, 0);
|
||||||
lv_label_set_text(value_setting_value_label, buf);
|
lv_label_set_text(value_setting_value_label, buf);
|
||||||
lv_obj_set_width(value_setting_value_label, txt_size.x);
|
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);
|
value_setting_value_label = lv_label_create(value_setting_bar);
|
||||||
lv_obj_align(value_setting_value_label, LV_ALIGN_CENTER, 0, 0);
|
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);
|
LV_PART_MAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user