From 35afb1787b84e5a928748131896426d1680b04e2 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sun, 30 Apr 2023 22:15:47 +0100 Subject: [PATCH] Scroll long text in variable item list --- .../services/gui/modules/variable_item_list.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/applications/services/gui/modules/variable_item_list.c b/applications/services/gui/modules/variable_item_list.c index 182cd127f..dff1eaa8a 100644 --- a/applications/services/gui/modules/variable_item_list.c +++ b/applications/services/gui/modules/variable_item_list.c @@ -79,7 +79,20 @@ static void variable_item_list_draw_callback(Canvas* canvas, void* _model) { canvas_set_color(canvas, ColorBlack); } - canvas_draw_str(canvas, 6, item_text_y, item->label); + if(item->current_value_index == 0 && furi_string_empty(item->current_value_text)) { + // Only left text, no right text + canvas_draw_str(canvas, 6, item_text_y, item->label); + } else { + elements_scrollable_text_line_str( + canvas, + 6, + item_text_y, + 66, + item->label, + scroll_counter, + false, + false); + } if(item->locked) { canvas_draw_icon(canvas, 110, item_text_y - 8, &I_Lock_7x8);