diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lib/display_text.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c index c6b5710644..c69661030e 100644 --- a/apps/plugins/lib/display_text.c +++ b/apps/plugins/lib/display_text.c | |||
@@ -62,16 +62,15 @@ bool display_text(short words, char** text, struct style_text* style, | |||
62 | rb->lcd_getstringsize(" ", &space_w, &height); | 62 | rb->lcd_getstringsize(" ", &space_w, &height); |
63 | for (i = 0; i < words; i++) { | 63 | for (i = 0; i < words; i++) { |
64 | rb->lcd_getstringsize(text[i], &width, NULL); | 64 | rb->lcd_getstringsize(text[i], &width, NULL); |
65 | /* skip to next line if the current one can't fit the word */ | 65 | /* skip to next line if the word is an empty string */ |
66 | if (x + width > vp_width - MARGIN) { | ||
67 | x = MARGIN; | ||
68 | y = y + height; | ||
69 | } | ||
70 | /* .. or if the word is the empty string */ | ||
71 | if (rb->strcmp(text[i], "")==0) { | 66 | if (rb->strcmp(text[i], "")==0) { |
72 | x = MARGIN; | 67 | x = MARGIN; |
73 | y = y + height; | 68 | y = y + height; |
74 | continue; | 69 | continue; |
70 | /* .. or if the current one can't fit the word */ | ||
71 | } else if (x + width > vp_width - MARGIN) { | ||
72 | x = MARGIN; | ||
73 | y = y + height; | ||
75 | } | 74 | } |
76 | /* display the remaining text by button click or exit */ | 75 | /* display the remaining text by button click or exit */ |
77 | if (y + height > vp_height - MARGIN) { | 76 | if (y + height > vp_height - MARGIN) { |