From c41dcb9ae9a37b4177ec789ac9c27462da5ccbe3 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Tue, 20 Aug 2002 19:39:55 +0000 Subject: Now using lcd margins instead of a line offset for displaying status bar. Needed to support fonts smaller than 8 pixels. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1823 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'apps/playlist.c') diff --git a/apps/playlist.c b/apps/playlist.c index 9bd42941bc..27665981f7 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -30,12 +30,10 @@ #include "settings.h" #include "status.h" #include "applimits.h" - #ifdef HAVE_LCD_BITMAP -#define LINE_Y (global_settings.statusbar&&statusbar_enabled?1:0) /* Y position the entry-list starts at */ -#else /* HAVE_LCD_BITMAP */ -#define LINE_Y 0 /* Y position the entry-list starts at */ -#endif /* HAVE_LCD_BITMAP */ +#include "icons.h" +#include "widgets.h" +#endif playlist_info_t playlist; @@ -183,10 +181,17 @@ void play_list(char *dir, /* "current directory" */ playlist.index = start_index; +#ifdef HAVE_LCD_BITMAP + if(global_settings.statusbar) + lcd_setmargins(0, STATUSBAR_HEIGHT); + else + lcd_setmargins(0, 0); +#endif + /* If file is NULL, the list is in RAM */ if(file) { lcd_clear_display(); - lcd_puts(0,LINE_Y,"Loading..."); + lcd_puts(0,0,"Loading..."); status_draw(); lcd_update(); playlist.in_ram = false; @@ -216,7 +221,7 @@ void play_list(char *dir, /* "current directory" */ if(global_settings.playlist_shuffle) { if(!playlist.in_ram) { - lcd_puts(0,LINE_Y,"Shuffling..."); + lcd_puts(0,0,"Shuffling..."); status_draw(); lcd_update(); randomise_playlist( random_seed ); @@ -247,7 +252,7 @@ void play_list(char *dir, /* "current directory" */ } if(!playlist.in_ram) { - lcd_puts(0,LINE_Y,"Playing... "); + lcd_puts(0,0,"Playing... "); status_draw(); lcd_update(); } @@ -342,7 +347,7 @@ void add_indices_to_playlist(void) next_tick = current_tick + HZ; snprintf(line, sizeof line, "%d files", playlist.amount); - lcd_puts(0,LINE_Y+1,line); + lcd_puts(0,1,line); status_draw(); lcd_update(); } @@ -357,7 +362,7 @@ void add_indices_to_playlist(void) } if(!playlist.in_ram) { snprintf(line, sizeof line, "%d files", playlist.amount); - lcd_puts(0,LINE_Y+1,line); + lcd_puts(0,1,line); status_draw(); lcd_update(); close(fd); -- cgit v1.2.3