Skip to content

Commit

Permalink
[FL-3583] Fix multiline aligned text going out of bounds (again) (#3084)
Browse files Browse the repository at this point in the history
Co-authored-by: あく <[email protected]>
  • Loading branch information
Astrrra and skotopes authored Sep 21, 2023
1 parent a089aeb commit 3fbb9f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions applications/services/gui/elements.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 3fbb9f2

Please sign in to comment.