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