summaryrefslogtreecommitdiff
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 33e00981da..b7a042733e 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -48,12 +48,13 @@
48 #define CURSOR_X (global_settings.scrollbar && \ 48 #define CURSOR_X (global_settings.scrollbar && \
49 viewer.num_tracks>viewer.num_display_lines?1:0) 49 viewer.num_tracks>viewer.num_display_lines?1:0)
50 #define CURSOR_Y 0 50 #define CURSOR_Y 0
51 #define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
51 52
52 #define ICON_WIDTH ((viewer.char_width > 6) ? viewer.char_width : 6) 53 #define ICON_WIDTH ((viewer.char_width > 6) ? viewer.char_width : 6)
53 54
54 #define MARGIN_X ((global_settings.scrollbar && \ 55 #define MARGIN_X ((global_settings.scrollbar && \
55 viewer.num_tracks > viewer.num_display_lines ? \ 56 viewer.num_tracks > viewer.num_display_lines ? \
56 SCROLLBAR_WIDTH : 0) + \ 57 SCROLLBAR_WIDTH : 0) + CURSOR_WIDTH + \
57 (global_settings.playlist_viewer_icons ? \ 58 (global_settings.playlist_viewer_icons ? \
58 ICON_WIDTH : 0)) 59 ICON_WIDTH : 0))
59 #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) 60 #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
@@ -461,7 +462,7 @@ static void display_playlist(void)
461 if ( viewer.line_height > 8 ) 462 if ( viewer.line_height > 8 )
462 offset = (viewer.line_height - 8) / 2; 463 offset = (viewer.line_height - 8) / 2;
463 lcd_mono_bitmap(bitmap_icons_6x8[Icon_Audio], 464 lcd_mono_bitmap(bitmap_icons_6x8[Icon_Audio],
464 CURSOR_X * 6, 465 CURSOR_X * 6 + CURSOR_WIDTH,
465 MARGIN_Y+(i*viewer.line_height) + offset, 6, 8); 466 MARGIN_Y+(i*viewer.line_height) + offset, 6, 8);
466#else 467#else
467 lcd_putc(LINE_X-1, i, Icon_Audio); 468 lcd_putc(LINE_X-1, i, Icon_Audio);
@@ -471,7 +472,7 @@ static void display_playlist(void)
471 { 472 {
472 /* Track we are moving */ 473 /* Track we are moving */
473#ifdef HAVE_LCD_BITMAP 474#ifdef HAVE_LCD_BITMAP
474 lcd_putsxy(CURSOR_X * 6, 475 lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH,
475 MARGIN_Y+(i*viewer.line_height), "M"); 476 MARGIN_Y+(i*viewer.line_height), "M");
476#else 477#else
477 lcd_putc(LINE_X-1, i, 'M'); 478 lcd_putc(LINE_X-1, i, 'M');
@@ -481,7 +482,7 @@ static void display_playlist(void)
481 { 482 {
482 /* Queued track */ 483 /* Queued track */
483#ifdef HAVE_LCD_BITMAP 484#ifdef HAVE_LCD_BITMAP
484 lcd_putsxy(CURSOR_X * 6, 485 lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH,
485 MARGIN_Y+(i*viewer.line_height), "Q"); 486 MARGIN_Y+(i*viewer.line_height), "Q");
486#else 487#else
487 lcd_putc(LINE_X-1, i, 'Q'); 488 lcd_putc(LINE_X-1, i, 'Q');
@@ -602,10 +603,11 @@ static void update_display_line(int line, bool scroll)
602 if (scroll) 603 if (scroll)
603 { 604 {
604#ifdef HAVE_LCD_BITMAP 605#ifdef HAVE_LCD_BITMAP
605 lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT); 606 if (global_settings.invert_cursor)
606#else 607 lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT);
607 lcd_puts_scroll(LINE_X, line, str); 608 else
608#endif 609#endif
610 lcd_puts_scroll(LINE_X, line, str);
609 } 611 }
610 else 612 else
611 lcd_puts(LINE_X, line, str); 613 lcd_puts(LINE_X, line, str);
@@ -849,12 +851,18 @@ bool playlist_viewer_ex(char* filename)
849 /* Flash cursor to identify that we are moving a track */ 851 /* Flash cursor to identify that we are moving a track */
850 cursor_on = !cursor_on; 852 cursor_on = !cursor_on;
851#ifdef HAVE_LCD_BITMAP 853#ifdef HAVE_LCD_BITMAP
852 lcd_set_drawmode(DRMODE_COMPLEMENT); 854 if (global_settings.invert_cursor)
853 lcd_fillrect( 855 {
854 MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height), 856 lcd_set_drawmode(DRMODE_COMPLEMENT);
855 LCD_WIDTH, viewer.line_height); 857 lcd_fillrect(
856 lcd_set_drawmode(DRMODE_SOLID); 858 MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height),
857 lcd_invertscroll(LINE_X, viewer.cursor_pos); 859 LCD_WIDTH, viewer.line_height);
860 lcd_set_drawmode(DRMODE_SOLID);
861 lcd_invertscroll(LINE_X, viewer.cursor_pos);
862 }
863 else
864 put_cursorxy(CURSOR_X, CURSOR_Y + viewer.cursor_pos,
865 cursor_on);
858 866
859 lcd_update_rect( 867 lcd_update_rect(
860 0, MARGIN_Y + (viewer.cursor_pos * viewer.line_height), 868 0, MARGIN_Y + (viewer.cursor_pos * viewer.line_height),