dashboard: trim card padding for battery gauge

This commit is contained in:
2026-06-10 02:25:36 -06:00
parent edfba63cc9
commit b6816e463c
2 changed files with 4 additions and 3 deletions
@@ -1,6 +1,6 @@
#pragma once
static const char *DASHBOARD_VERSION = "0.1.23-battery-nudge-up";
static const char *DASHBOARD_VERSION = "0.1.24-card-padding-trim";
// Update these if your Cargo ESP AP credentials are different.
static const char *CARGO_WIFI_SSID = "OverlandController";
@@ -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);