text/plain
•
602 B
•
19 lines
#include "ui.h"
#include "lvgl.h"
char string_buffer [256];
lv_obj_t *bvs_list_add_button(lv_obj_t *list, const void *icon, const char *txt) {
lv_obj_t *ret = lv_list_add_button(list, icon, txt);
lv_obj_set_style_pad_hor(ret, 2, 0);
lv_obj_set_style_pad_ver(ret, 1, 0);
return ret;
}
lv_obj_t *bvs_list_add_header(lv_obj_t *list, const char *txt) {
lv_obj_t *header = lv_list_add_text(list, txt);
lv_obj_set_style_bg_color(header, lv_color_hex(0x0288D1), 0);
lv_obj_set_style_bg_opa(header, LV_OPA_COVER, 0);
lv_obj_set_style_text_color(header, lv_color_hex(0xFFFFFF), 0);
return header;
}