From edbb67c0c84d91d6cd6eb81036c3a6a6de213e2c Mon Sep 17 00:00:00 2001 From: drkhsh Date: Mon, 27 Apr 2026 12:26:27 +0200 Subject: [PATCH] LvMessageView: reserve bubble pad-bottom for timestamp row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timestamp label was positioned via lv_obj_align_to below the message box, but the bubble container's LV_SIZE_CONTENT height was driven entirely by the box, so the time rendered below the bubble's allocated row in the flex scroll — visibly hanging into the gap. Add pad_bottom=14 to the bubble so its outer height includes the timestamp row, and anchor the box at TOP_LEFT/TOP_RIGHT (was LEFT_MID/RIGHT_MID) so the layout stacks cleanly: box on top, timestamp tucked under it inside the bubble's bbox. --- src/ui/screens/LvMessageView.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/screens/LvMessageView.cpp b/src/ui/screens/LvMessageView.cpp index f10d561..98f0e1b 100644 --- a/src/ui/screens/LvMessageView.cpp +++ b/src/ui/screens/LvMessageView.cpp @@ -196,10 +196,14 @@ void LvMessageView::appendMessage(const LXMFMessage& msg) { const lv_font_t* font = &lv_font_ratdeck_12; int maxBubbleW = Theme::CONTENT_W * 3 / 4; - // Bubble container + // Bubble container. Reserve pad_bottom for the timestamp row so the + // bubble's allocated height in the flex scroll includes it — without + // this, the time renders into the row gap and looks like it's hanging + // outside the bubble. lv_obj_t* bubble = lv_obj_create(_msgScroll); lv_obj_set_width(bubble, Theme::CONTENT_W - 12); lv_obj_set_style_pad_all(bubble, 0, 0); + lv_obj_set_style_pad_bottom(bubble, 14, 0); lv_obj_set_style_bg_opa(bubble, LV_OPA_TRANSP, 0); lv_obj_set_style_border_width(bubble, 0, 0); lv_obj_clear_flag(bubble, LV_OBJ_FLAG_SCROLLABLE); @@ -216,10 +220,10 @@ void LvMessageView::appendMessage(const LXMFMessage& msg) { if (msg.incoming) { lv_obj_set_style_bg_color(box, lv_color_hex(Theme::MSG_IN_BG), 0); - lv_obj_align(box, LV_ALIGN_LEFT_MID, 0, 0); + lv_obj_align(box, LV_ALIGN_TOP_LEFT, 0, 0); } else { lv_obj_set_style_bg_color(box, lv_color_hex(Theme::MSG_OUT_BG), 0); - lv_obj_align(box, LV_ALIGN_RIGHT_MID, 0, 0); + lv_obj_align(box, LV_ALIGN_TOP_RIGHT, 0, 0); } lv_obj_set_style_bg_opa(box, LV_OPA_COVER, 0);