diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-01 12:58:00 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-01 12:58:00 +0100 |
commit | 420fb1163c526cdbfba4b131b8c33824f401cd15 (patch) | |
tree | ae4a2a2e480464e6b562f4c4fa163a410e58b425 | |
parent | 3bc6408bbe77b76ced68bb7711da9106ba535a55 (diff) | |
download | rockbox-420fb1163c.tar.gz rockbox-420fb1163c.zip |
skin engine: Fix bug with %Vs(color) tag
The %Vs(color) tag doesn't set the text style properly and causes
the background to not be cleared when rendering lines. For static
text this is rarely a problem, but for scrolling text it'll cause
the text to "smear" once it starts scrolling.
Fix this by setting STYLE_DEFAULT, so the background gets redrawn
when the line scrolls.
Bug report: https://forums.rockbox.org/index.php/topic,54320.0.html
Change-Id: I835c806005ea40fd6bac3692e52a9c325581a293
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index d89ca8b534..6021f0647c 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -615,7 +615,8 @@ static int parse_viewporttextstyle(struct skin_element *element, if (element->params_count < 2 || !parse_color(curr_screen, get_param_text(element, 1), &colour)) return 1; - line->style = STYLE_COLORED; + /* STYLE_COLORED is only a modifier and can't be used on its own */ + line->style = STYLE_COLORED | STYLE_DEFAULT; line->text_color = colour; } #ifdef HAVE_LCD_COLOR |