1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

[FL-3583] Fix multiline aligned text going out of bounds (again) (#3084)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra
2023-09-21 18:29:28 +09:00
committed by GitHub
parent a089aeb2bd
commit 3fbb9f24f8

View File

@@ -290,6 +290,7 @@ void elements_multiline_text_aligned(
} else if((y + font_height) > canvas_height(canvas)) {
line = furi_string_alloc_printf("%.*s...\n", chars_fit, start);
} else {
chars_fit -= 1; // account for the dash
line = furi_string_alloc_printf("%.*s-\n", chars_fit, start);
}
canvas_draw_str_aligned(canvas, x, y, horizontal, vertical, furi_string_get_cstr(line));