From b63af9fee160b309f3659c7c7ba58fc65236e414 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Tue, 6 Oct 2026 21:25:27 +0200 Subject: [PATCH] fix(ui-lvgl): GPS signal chart spans the box from the first bar Co-Authored-By: Claude Opus 5.5 --- examples/companion_radio/ui-lvgl/GpsScreen.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/companion_radio/ui-lvgl/GpsScreen.h b/examples/companion_radio/ui-lvgl/GpsScreen.h index ebff3e4a..2256137f 100644 --- a/examples/companion_radio/ui-lvgl/GpsScreen.h +++ b/examples/companion_radio/ui-lvgl/GpsScreen.h @@ -21,7 +21,7 @@ enum : uint8_t { TAB_SKY, TAB_SIGNAL, TAB_DETAILS, TAB_COUNT }; static uint8_t s_tab = TAB_SKY; // kept across visits static lv_obj_t* s_sky = nullptr; // sky plot (drawn) -static lv_obj_t* s_bars = nullptr; // signal bars (drawn, as wide as the satellites need) +static lv_obj_t* s_bars = nullptr; // signal bars (drawn, the box's width or as wide as the satellites need) static lv_obj_t* s_status = nullptr; static lv_obj_t* s_used = nullptr; static lv_obj_t* s_on_btn = nullptr; @@ -326,6 +326,7 @@ void UITask::buildGps() { lv_obj_remove_flag(s_bars, LV_OBJ_FLAG_CLICKABLE); lv_obj_add_flag(s_bars, LV_OBJ_FLAG_EVENT_BUBBLE); lv_obj_set_size(s_bars, BAR_PITCH, BARS_H); + lv_obj_set_style_min_width(s_bars, LV_PCT(100), 0); // the scale's lines span the box from the start lv_obj_add_event_cb(s_bars, onGpsBarsDraw, LV_EVENT_DRAW_MAIN_END, NULL); // Constellations: used / in view, a pill each (a pill never breaks in two).