From 8d4d5f67ea9134e9a108eb18e1533c6b84c0ff84 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 5 Aug 2007 10:25:00 +0000 Subject: Address FS#6310 - shows an "infinite" slider when deleting/copying/moving files. maybe add this to other parts of the code so it doesnt look like the ui has stalled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14189 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/scrollbar.c | 20 ++++++++++++++++++++ apps/gui/scrollbar.h | 1 + 2 files changed, 21 insertions(+) (limited to 'apps/gui') diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c index b9038d902b..e2e70fd9fb 100644 --- a/apps/gui/scrollbar.c +++ b/apps/gui/scrollbar.c @@ -241,4 +241,24 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x, #endif } } + +void show_busy_slider(struct screen *s, int x, int y, int width, int height) +{ + static int start = 0, dir = 1; + gui_scrollbar_draw(s, x, y, width, height, 100, + start, start+20, HORIZONTAL); +#if NB_SCREENS > 1 + if (s->screen_type == SCREEN_MAIN) + { +#endif + start += (dir*2); + if (start > 79) + dir = -1; + else if (start < 1) + dir = 1; +#if NB_SCREENS > 1 + } +#endif +} + #endif /* HAVE_LCD_BITMAP */ diff --git a/apps/gui/scrollbar.h b/apps/gui/scrollbar.h index 40279a1a9d..9e60730de0 100644 --- a/apps/gui/scrollbar.h +++ b/apps/gui/scrollbar.h @@ -55,5 +55,6 @@ extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int width, int height, int items, int min_shown, int max_shown, unsigned flags); +extern void show_busy_slider(struct screen *s, int x, int y, int width, int height); #endif /* HAVE_LCD_BITMAP */ #endif /* _GUI_SCROLLBAR_H_ */ -- cgit v1.2.3