dashboard: trim card padding for battery gauge
This commit is contained in:
@@ -664,7 +664,7 @@ static lv_obj_t *create_card(lv_obj_t *parent, const char *title, int width, int
|
||||
lv_obj_set_style_bg_color(card, lv_color_hex(0x1F2933), 0);
|
||||
lv_obj_set_style_border_color(card, lv_color_hex(0x3A4652), 0);
|
||||
lv_obj_set_style_border_width(card, 2, 0);
|
||||
lv_obj_set_style_pad_all(card, 6, 0);
|
||||
lv_obj_set_style_pad_all(card, 0, 0);
|
||||
lv_obj_set_scrollbar_mode(card, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
lv_obj_t *title_label = lv_label_create(card);
|
||||
@@ -674,6 +674,7 @@ static lv_obj_t *create_card(lv_obj_t *parent, const char *title, int width, int
|
||||
|
||||
if (title == nullptr || title[0] == '\0') {
|
||||
lv_obj_add_flag(title_label, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_set_size(title_label, 0, 0);
|
||||
}
|
||||
|
||||
return card;
|
||||
@@ -762,7 +763,7 @@ static void create_overland_overview_screen()
|
||||
lv_obj_set_style_text_font(battery_estimate_label, &lv_font_montserrat_30, 0);
|
||||
lv_obj_set_width(battery_estimate_label, 340);
|
||||
lv_obj_set_style_text_align(battery_estimate_label, LV_TEXT_ALIGN_CENTER, 0);
|
||||
lv_obj_align(battery_estimate_label, LV_ALIGN_TOP_MID, 0, 196);
|
||||
lv_obj_align(battery_estimate_label, LV_ALIGN_TOP_MID, 0, 188);
|
||||
lv_obj_add_flag(battery_estimate_label, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
battery_soc_label = lv_label_create(battery_card);
|
||||
|
||||
Reference in New Issue
Block a user