summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-12-19 11:32:26 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2024-12-19 11:32:26 -0500
commitb77c973d1a4408a86b9d99e6125ce5747934fc81 (patch)
tree1d5b07dfe8593500287323af34908ab56fd5a0a0
parent12ea82d9e4a688720a1a7029962c6ed34792abf7 (diff)
downloadrockbox-b77c973d1a.tar.gz
rockbox-b77c973d1a.zip
[Bugfix] line_alternators reset scroll state without new data
this is fallout from allowing a scroll item redisplay timeouts prior to eb3e5eb '[Feature] skinengine subline timeout hide line for n seconds' the behavior could be seen sparingly after we now have an alternator front and center with the next track scroll unfortunately this results in strings never scrolling to completion fix: if the current line hasn't changed and we are not doing a full screen refresh, don't invalidate the scroll viewport (the scroll engine will still handle the user data changing if that actually occurred) Change-Id: I10d4b8a05caa28de617dc6454520ce5426d69532
-rw-r--r--apps/gui/skin_engine/skin_render.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index 8431a68894..e8e3506778 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -712,14 +712,18 @@ bool skin_render_alternator(struct skin_element* element, struct skin_draw_info
}
while (try_line != start && !suitable);
+ if (info->refresh_type == SKIN_REFRESH_ALL
+ || try_line != alternator->current_line)
+ {
+ info->force_redraw = true;
+ }
+ info->refresh_type = SKIN_REFRESH_ALL;
+
if (suitable)
{
alternator->current_line = try_line;
alternator->next_change_tick = current_tick + rettimeout;
}
-
- info->refresh_type = SKIN_REFRESH_ALL;
- info->force_redraw = true;
}
bool ret = skin_render_line(get_child(element->children, alternator->current_line), info);
info->refresh_type = old_refresh;