From 9c40c83f4a275af302f954e82c3c3d1e0d4484b9 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 25 Oct 2026 21:33:59 +0100 Subject: [PATCH] fix(l2): the chat rows' preview isn't cut at the bottom The font's line is 18 px (emoji and fallback glyphs), the subtitle label was a fixed 15: the tails of y, g, j and emoji were cut. Now 18, the title and the subtitle 1 px further apart; the row stays 44. Co-Authored-By: Claude Sonnet 5.5 --- examples/companion_radio/ui-lvgl/ChatList.h | 8 ++++---- examples/companion_radio/ui-lvgl/Widgets.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/companion_radio/ui-lvgl/ChatList.h b/examples/companion_radio/ui-lvgl/ChatList.h index 25ba9ce7..132f1e44 100644 --- a/examples/companion_radio/ui-lvgl/ChatList.h +++ b/examples/companion_radio/ui-lvgl/ChatList.h @@ -63,13 +63,13 @@ static lv_obj_t* listRow(lv_obj_t* parent, const char* title, const char* sub, lv_obj_t* t = label(row, title, THEME_FONT_BODY, theme::TEXT); lv_label_set_long_mode(t, LV_LABEL_LONG_DOT); lv_obj_set_width(t, 230); - lv_obj_align(t, LV_ALIGN_TOP_LEFT, theme::PAD, sub ? 5 : 13); + lv_obj_align(t, LV_ALIGN_TOP_LEFT, theme::PAD, sub ? 4 : 13); lv_obj_set_user_data(row, t); if (sub) { lv_obj_t* s = label(row, sub, THEME_FONT_SMALL, theme::TEXT_MUTED); lv_label_set_long_mode(s, LV_LABEL_LONG_DOT); - lv_obj_set_size(s, 230, 15); // fixed height: LONG_DOT cuts instead of wrapping over the title - lv_obj_align(s, LV_ALIGN_BOTTOM_LEFT, theme::PAD, -5); + lv_obj_set_size(s, 230, 18); // fixed height: LONG_DOT cuts instead of wrapping over the title -- the font's whole line (18), or the tails of y and g and emoji are cut + lv_obj_align(s, LV_ALIGN_BOTTOM_LEFT, theme::PAD, -4); } return row; } @@ -86,7 +86,7 @@ static void rowSet(lv_obj_t* row, const char* title, const char* sub, uint32_t t lv_obj_t* s = lv_obj_get_child(row, 1); setText(t, title); setTextColor(t, title_col); - int32_t y = sub ? 5 : 13; // as listRow() puts it + int32_t y = sub ? 4 : 13; // as listRow() puts it if (lv_obj_get_style_y(t, LV_PART_MAIN) != y) lv_obj_set_y(t, y); if (sub) setText(s, sub); if (!sub != lv_obj_has_flag(s, LV_OBJ_FLAG_HIDDEN)) lv_obj_set_flag(s, LV_OBJ_FLAG_HIDDEN, !sub); diff --git a/examples/companion_radio/ui-lvgl/Widgets.h b/examples/companion_radio/ui-lvgl/Widgets.h index 58d05bde..ed93ab6e 100644 --- a/examples/companion_radio/ui-lvgl/Widgets.h +++ b/examples/companion_radio/ui-lvgl/Widgets.h @@ -689,13 +689,13 @@ static lv_obj_t* settingRow(lv_obj_t* parent, const char* text, const char* hint lv_obj_set_size(row, LV_PCT(100), theme::ROW_H); lv_obj_set_style_radius(row, theme::RADIUS, 0); lv_obj_t* t = label(row, text, THEME_FONT_BODY, theme::TEXT); - lv_obj_align(t, LV_ALIGN_TOP_LEFT, theme::PAD, hint ? 5 : 13); + lv_obj_align(t, LV_ALIGN_TOP_LEFT, theme::PAD, hint ? 4 : 13); lv_obj_set_user_data(row, t); if (hint) { lv_obj_t* h = label(row, hint, THEME_FONT_SMALL, theme::TEXT_MUTED); lv_label_set_long_mode(h, LV_LABEL_LONG_DOT); - lv_obj_set_size(h, hint_w, 15); // fixed height: cut, don't wrap onto the label - lv_obj_align(h, LV_ALIGN_BOTTOM_LEFT, theme::PAD, -5); + lv_obj_set_size(h, hint_w, 18); // fixed height: cut, don't wrap onto the label -- the font's whole line, or the tails of y and g are cut + lv_obj_align(h, LV_ALIGN_BOTTOM_LEFT, theme::PAD, -4); } return row; }