dashboard: align fuel icon with bar

This commit is contained in:
2026-06-11 23:43:06 -06:00
parent 6bf0c6dc2e
commit a43c1c3594
2 changed files with 4 additions and 4 deletions
@@ -1,6 +1,6 @@
#pragma once
static const char *DASHBOARD_VERSION = "0.1.63-raise-temp-icon";
static const char *DASHBOARD_VERSION = "0.1.64-align-fuel-icon-bar";
// Update these if your Cargo ESP AP credentials are different.
static const char *CARGO_WIFI_SSID = "OverlandController";
@@ -1295,12 +1295,12 @@ static void create_overland_overview_screen()
lv_obj_set_style_img_recolor(fuel_icon, lv_color_white(), 0);
lv_obj_set_style_img_recolor_opa(fuel_icon, LV_OPA_COVER, 0);
lv_img_set_zoom(fuel_icon, 90);
lv_obj_align(fuel_icon, LV_ALIGN_BOTTOM_LEFT, 18, 4);
lv_obj_align(fuel_icon, LV_ALIGN_BOTTOM_LEFT, 34, -23);
vehicle_fuel_bar = lv_bar_create(vehicle_card);
lv_obj_add_event_cb(vehicle_fuel_bar, fuel_bar_draw_value_cb, LV_EVENT_DRAW_PART_END, NULL);
lv_obj_set_size(vehicle_fuel_bar, 202, 22);
lv_obj_align(vehicle_fuel_bar, LV_ALIGN_BOTTOM_LEFT, 70, -14);
lv_obj_align(vehicle_fuel_bar, LV_ALIGN_BOTTOM_LEFT, 74, -29);
lv_bar_set_range(vehicle_fuel_bar, 0, 100);
lv_bar_set_value(vehicle_fuel_bar, 72, LV_ANIM_OFF);
lv_obj_set_style_radius(vehicle_fuel_bar, 3, 0);
@@ -1318,7 +1318,7 @@ static void create_overland_overview_screen()
lv_obj_set_style_bg_color(tick, lv_color_hex(0x7D8996), 0);
lv_obj_set_style_border_width(tick, 0, 0);
lv_obj_set_style_radius(tick, 0, 0);
lv_obj_align(tick, LV_ALIGN_BOTTOM_LEFT, 70 + (i * 50), -11);
lv_obj_align(tick, LV_ALIGN_BOTTOM_LEFT, 74 + (i * 50), -26);
}
vehicle_fuel_value_label = lv_label_create(vehicle_card);