diff options
-rw-r--r-- | apps/lang/english.lang | 18 | ||||
-rw-r--r-- | apps/lang/italiano.lang | 24 | ||||
-rw-r--r-- | apps/menu.c | 45 | ||||
-rw-r--r-- | apps/menu.h | 4 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 34 | ||||
-rw-r--r-- | apps/recorder/icons.c | 1 | ||||
-rw-r--r-- | apps/recorder/icons.h | 1 | ||||
-rw-r--r-- | apps/recorder/recording.c | 15 | ||||
-rw-r--r-- | apps/settings.c | 3 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/tree.c | 12 |
11 files changed, 99 insertions, 60 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 8699fa502e..6feac25ee8 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -1334,9 +1334,9 @@ voice: "" | |||
1334 | new: | 1334 | new: |
1335 | 1335 | ||
1336 | id: LANG_INVERT_CURSOR | 1336 | id: LANG_INVERT_CURSOR |
1337 | desc: DEPRECATED | 1337 | desc: in settings_menu |
1338 | eng: "" | 1338 | eng: "Line Selector" |
1339 | voice: "" | 1339 | voice: "Line Selector" |
1340 | new: | 1340 | new: |
1341 | 1341 | ||
1342 | id: LANG_RECORDING_EDITABLE | 1342 | id: LANG_RECORDING_EDITABLE |
@@ -1364,15 +1364,15 @@ voice: "Caption backlight" | |||
1364 | new: | 1364 | new: |
1365 | 1365 | ||
1366 | id: LANG_INVERT_CURSOR_POINTER | 1366 | id: LANG_INVERT_CURSOR_POINTER |
1367 | desc: DEPRECATED | 1367 | desc: in settings_menu |
1368 | eng: "" | 1368 | eng: "Pointer" |
1369 | voice: "" | 1369 | voice: "Pointer" |
1370 | new: | 1370 | new: |
1371 | 1371 | ||
1372 | id: LANG_INVERT_CURSOR_BAR | 1372 | id: LANG_INVERT_CURSOR_BAR |
1373 | desc: DEPRECATED | 1373 | desc: in settings_menu |
1374 | eng: "" | 1374 | eng: "Bar(Inverse)" |
1375 | voice: "" | 1375 | voice: "Inverse Bar" |
1376 | new: | 1376 | new: |
1377 | 1377 | ||
1378 | id: LANG_INVERT_LCD_NORMAL | 1378 | id: LANG_INVERT_LCD_NORMAL |
diff --git a/apps/lang/italiano.lang b/apps/lang/italiano.lang index 22e28df5c1..b7fb712ddb 100644 --- a/apps/lang/italiano.lang +++ b/apps/lang/italiano.lang | |||
@@ -1320,10 +1320,10 @@ voice: | |||
1320 | new: "" | 1320 | new: "" |
1321 | 1321 | ||
1322 | id: LANG_INVERT_CURSOR | 1322 | id: LANG_INVERT_CURSOR |
1323 | desc: DEPRECATED | 1323 | desc: In settings_menu |
1324 | eng: "" | 1324 | eng: "Line Selector" |
1325 | voice: | 1325 | voice: "Selettore Di Linea" |
1326 | new: | 1326 | new: "Selettore Di Linea" |
1327 | 1327 | ||
1328 | id: LANG_RECORDING_EDITABLE | 1328 | id: LANG_RECORDING_EDITABLE |
1329 | desc: Editable recordings setting | 1329 | desc: Editable recordings setting |
@@ -1350,16 +1350,16 @@ voice: "Retroilluminazione al cambio traccia" | |||
1350 | new: "Retroilluminazione al cambio traccia" | 1350 | new: "Retroilluminazione al cambio traccia" |
1351 | 1351 | ||
1352 | id: LANG_INVERT_CURSOR_POINTER | 1352 | id: LANG_INVERT_CURSOR_POINTER |
1353 | desc: DEPRECATED | 1353 | desc: in settings_menu |
1354 | eng: "" | 1354 | eng: "Pointer" |
1355 | voice: | 1355 | voice: "Puntatore" |
1356 | new: | 1356 | new: "Puntatore" |
1357 | 1357 | ||
1358 | id: LANG_INVERT_CURSOR_BAR | 1358 | id: LANG_INVERT_CURSOR_BAR |
1359 | desc: DEPRECATED | 1359 | desc: in settings_menu |
1360 | eng: "" | 1360 | eng: "Bar(Inverse)" |
1361 | voice: | 1361 | voice: "Barra Invertita" |
1362 | new: | 1362 | new: "Barra (Invertita)" |
1363 | 1363 | ||
1364 | id: LANG_INVERT_LCD_NORMAL | 1364 | id: LANG_INVERT_LCD_NORMAL |
1365 | desc: in settings_menu | 1365 | desc: in settings_menu |
diff --git a/apps/menu.c b/apps/menu.c index 3b0ee4ddd6..ad22047b9d 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -59,7 +59,8 @@ struct menu { | |||
59 | 59 | ||
60 | /* pixel margins */ | 60 | /* pixel margins */ |
61 | #define MARGIN_X (global_settings.scrollbar && \ | 61 | #define MARGIN_X (global_settings.scrollbar && \ |
62 | menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) | 62 | menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) +\ |
63 | CURSOR_WIDTH | ||
63 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) | 64 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) |
64 | 65 | ||
65 | /* position the entry-list starts at */ | 66 | /* position the entry-list starts at */ |
@@ -72,6 +73,7 @@ struct menu { | |||
72 | the margins, so this is the amount of lines | 73 | the margins, so this is the amount of lines |
73 | we add to the cursor Y position to position | 74 | we add to the cursor Y position to position |
74 | it on a line */ | 75 | it on a line */ |
76 | #define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4) | ||
75 | 77 | ||
76 | #define SCROLLBAR_X 0 | 78 | #define SCROLLBAR_X 0 |
77 | #define SCROLLBAR_Y lcd_getymargin() | 79 | #define SCROLLBAR_Y lcd_getymargin() |
@@ -93,19 +95,44 @@ struct menu { | |||
93 | static struct menu menus[MAX_MENUS]; | 95 | static struct menu menus[MAX_MENUS]; |
94 | static bool inuse[MAX_MENUS] = { false }; | 96 | static bool inuse[MAX_MENUS] = { false }; |
95 | 97 | ||
96 | #ifdef HAVE_LCD_CHARCELLS | ||
97 | /* count in letter positions, NOT pixels */ | 98 | /* count in letter positions, NOT pixels */ |
98 | void put_cursorxy(int x, int y, bool on) | 99 | void put_cursorxy(int x, int y, bool on) |
99 | { | 100 | { |
101 | #ifdef HAVE_LCD_BITMAP | ||
102 | int fh, fw; | ||
103 | int xpos, ypos; | ||
104 | |||
105 | /* check here instead of at every call (ugly, but cheap) */ | ||
106 | if (global_settings.invert_cursor) | ||
107 | return; | ||
108 | |||
109 | lcd_getstringsize("A", &fw, &fh); | ||
110 | xpos = x*6; | ||
111 | ypos = y*fh + lcd_getymargin(); | ||
112 | if ( fh > 8 ) | ||
113 | ypos += (fh - 8) / 2; | ||
114 | #endif | ||
115 | |||
100 | /* place the cursor */ | 116 | /* place the cursor */ |
101 | if(on) { | 117 | if(on) { |
118 | #ifdef HAVE_LCD_BITMAP | ||
119 | lcd_mono_bitmap(bitmap_icons_6x8[Icon_Cursor], xpos, ypos, 4, 8); | ||
120 | #else | ||
102 | lcd_putc(x, y, CURSOR_CHAR); | 121 | lcd_putc(x, y, CURSOR_CHAR); |
122 | #endif | ||
103 | } | 123 | } |
104 | else { | 124 | else { |
125 | #if defined(HAVE_LCD_BITMAP) | ||
126 | /* I use xy here since it needs to disregard the margins */ | ||
127 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | ||
128 | lcd_fillrect (xpos, ypos, 4, 8); | ||
129 | lcd_set_drawmode(DRMODE_SOLID); | ||
130 | #else | ||
105 | lcd_putc(x, y, ' '); | 131 | lcd_putc(x, y, ' '); |
132 | #endif | ||
106 | } | 133 | } |
107 | } | 134 | } |
108 | #endif | 135 | |
109 | void menu_draw(int m) | 136 | void menu_draw(int m) |
110 | { | 137 | { |
111 | int i = 0; | 138 | int i = 0; |
@@ -153,20 +180,18 @@ void menu_draw(int m) | |||
153 | /* We want to scroll the line where the cursor is */ | 180 | /* We want to scroll the line where the cursor is */ |
154 | if((menus[m].cursor - menus[m].top)==(i-menus[m].top)) | 181 | if((menus[m].cursor - menus[m].top)==(i-menus[m].top)) |
155 | #ifdef HAVE_LCD_BITMAP | 182 | #ifdef HAVE_LCD_BITMAP |
156 | lcd_puts_scroll_style(LINE_X, i-menus[m].top, | 183 | if (global_settings.invert_cursor) |
157 | P2STR(menus[m].items[i].desc), STYLE_INVERT); | 184 | lcd_puts_scroll_style(LINE_X, i-menus[m].top, |
158 | #else | 185 | P2STR(menus[m].items[i].desc), STYLE_INVERT); |
159 | lcd_puts_scroll(LINE_X, i-menus[m].top, | 186 | else |
160 | P2STR(menus[m].items[i].desc)); | ||
161 | #endif | 187 | #endif |
188 | lcd_puts_scroll(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc)); | ||
162 | else | 189 | else |
163 | lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc)); | 190 | lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc)); |
164 | } | 191 | } |
165 | 192 | ||
166 | #ifdef HAVE_LCD_CHARCELLS | ||
167 | /* place the cursor */ | 193 | /* place the cursor */ |
168 | put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true); | 194 | put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true); |
169 | #endif | ||
170 | 195 | ||
171 | #ifdef HAVE_LCD_BITMAP | 196 | #ifdef HAVE_LCD_BITMAP |
172 | if (global_settings.scrollbar && menus[m].itemcount > menu_lines) | 197 | if (global_settings.scrollbar && menus[m].itemcount > menu_lines) |
diff --git a/apps/menu.h b/apps/menu.h index d8d9386236..a378bd8402 100644 --- a/apps/menu.h +++ b/apps/menu.h | |||
@@ -91,11 +91,7 @@ int menu_init(const struct menu_item* mitems, int count, int (*callback)(int, in | |||
91 | const char *button1, const char *button2, const char *button3); | 91 | const char *button1, const char *button2, const char *button3); |
92 | void menu_exit(int menu); | 92 | void menu_exit(int menu); |
93 | 93 | ||
94 | #ifdef HAVE_LCD_CHARCELLS | ||
95 | void put_cursorxy(int x, int y, bool on); | 94 | void put_cursorxy(int x, int y, bool on); |
96 | #else | ||
97 | #define put_cursorxy(...) | ||
98 | #endif | ||
99 | 95 | ||
100 | /* Returns below define, or number of selected menu item*/ | 96 | /* Returns below define, or number of selected menu item*/ |
101 | int menu_show(int m); | 97 | int menu_show(int m); |
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), |
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 4d1d2908c4..148235f040 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -39,6 +39,7 @@ const unsigned char bitmap_icons_6x8[LastIcon][6] = | |||
39 | { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */ | 39 | { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */ |
40 | { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */ | 40 | { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */ |
41 | { 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */ | 41 | { 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */ |
42 | { 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00 }, /* Cursor / Marker */ | ||
42 | { 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */ | 43 | { 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */ |
43 | { 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */ | 44 | { 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */ |
44 | { 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */ | 45 | { 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */ |
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index 5c442ea371..17605ef490 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -36,6 +36,7 @@ enum icons_6x8 { | |||
36 | Icon_Audio, | 36 | Icon_Audio, |
37 | Icon_Folder, | 37 | Icon_Folder, |
38 | Icon_Playlist, | 38 | Icon_Playlist, |
39 | Icon_Cursor, | ||
39 | Icon_Wps, | 40 | Icon_Wps, |
40 | Icon_Firmware, | 41 | Icon_Firmware, |
41 | Icon_Font, | 42 | Icon_Font, |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 72d752ec55..ea71538322 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -348,7 +348,7 @@ bool recording_screen(void) | |||
348 | 348 | ||
349 | lcd_setfont(FONT_SYSFIXED); | 349 | lcd_setfont(FONT_SYSFIXED); |
350 | lcd_getstringsize("M", &w, &h); | 350 | lcd_getstringsize("M", &w, &h); |
351 | lcd_setmargins(0, 8); | 351 | lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8); |
352 | 352 | ||
353 | if(rec_create_directory() > 0) | 353 | if(rec_create_directory() > 0) |
354 | have_recorded = true; | 354 | have_recorded = true; |
@@ -598,7 +598,7 @@ bool recording_screen(void) | |||
598 | update_countdown = 1; /* Update immediately */ | 598 | update_countdown = 1; /* Update immediately */ |
599 | 599 | ||
600 | lcd_setfont(FONT_SYSFIXED); | 600 | lcd_setfont(FONT_SYSFIXED); |
601 | lcd_setmargins(0, 8); | 601 | lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8); |
602 | } | 602 | } |
603 | break; | 603 | break; |
604 | #endif | 604 | #endif |
@@ -739,7 +739,7 @@ bool recording_screen(void) | |||
739 | fmt_gain(SOUND_MIC_GAIN, | 739 | fmt_gain(SOUND_MIC_GAIN, |
740 | global_settings.rec_mic_gain, | 740 | global_settings.rec_mic_gain, |
741 | buf2, sizeof(buf2))); | 741 | buf2, sizeof(buf2))); |
742 | if (pos++ == cursor) | 742 | if (global_settings.invert_cursor && (pos++ == cursor)) |
743 | lcd_puts_style(0, 4, buf, STYLE_INVERT); | 743 | lcd_puts_style(0, 4, buf, STYLE_INVERT); |
744 | else | 744 | else |
745 | lcd_puts(0, 4, buf); | 745 | lcd_puts(0, 4, buf); |
@@ -754,7 +754,7 @@ bool recording_screen(void) | |||
754 | snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN), | 754 | snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN), |
755 | fmt_gain(SOUND_LEFT_GAIN, gain, | 755 | fmt_gain(SOUND_LEFT_GAIN, gain, |
756 | buf2, sizeof(buf2))); | 756 | buf2, sizeof(buf2))); |
757 | if (pos++ == cursor) | 757 | if (global_settings.invert_cursor && (pos++ == cursor)) |
758 | lcd_puts_style(0, 4, buf, STYLE_INVERT); | 758 | lcd_puts_style(0, 4, buf, STYLE_INVERT); |
759 | else | 759 | else |
760 | lcd_puts(0, 4, buf); | 760 | lcd_puts(0, 4, buf); |
@@ -763,7 +763,7 @@ bool recording_screen(void) | |||
763 | fmt_gain(SOUND_LEFT_GAIN, | 763 | fmt_gain(SOUND_LEFT_GAIN, |
764 | global_settings.rec_left_gain, | 764 | global_settings.rec_left_gain, |
765 | buf2, sizeof(buf2))); | 765 | buf2, sizeof(buf2))); |
766 | if (pos++ == cursor) | 766 | if (global_settings.invert_cursor && (pos++ == cursor)) |
767 | lcd_puts_style(0, 5, buf, STYLE_INVERT); | 767 | lcd_puts_style(0, 5, buf, STYLE_INVERT); |
768 | else | 768 | else |
769 | lcd_puts(0, 5, buf); | 769 | lcd_puts(0, 5, buf); |
@@ -772,13 +772,16 @@ bool recording_screen(void) | |||
772 | fmt_gain(SOUND_RIGHT_GAIN, | 772 | fmt_gain(SOUND_RIGHT_GAIN, |
773 | global_settings.rec_right_gain, | 773 | global_settings.rec_right_gain, |
774 | buf2, sizeof(buf2))); | 774 | buf2, sizeof(buf2))); |
775 | if (pos++ == cursor) | 775 | if (global_settings.invert_cursor && (pos++ == cursor)) |
776 | lcd_puts_style(0, 6, buf, STYLE_INVERT); | 776 | lcd_puts_style(0, 6, buf, STYLE_INVERT); |
777 | else | 777 | else |
778 | lcd_puts(0, 6, buf); | 778 | lcd_puts(0, 6, buf); |
779 | } | 779 | } |
780 | } | 780 | } |
781 | 781 | ||
782 | if(global_settings.rec_source != SOURCE_SPDIF) | ||
783 | put_cursorxy(0, 4 + cursor, true); | ||
784 | |||
782 | if (global_settings.rec_source != SOURCE_LINE) { | 785 | if (global_settings.rec_source != SOURCE_LINE) { |
783 | snprintf(buf, 32, "%s %s [%d]", | 786 | snprintf(buf, 32, "%s %s [%d]", |
784 | freq_str[global_settings.rec_frequency], | 787 | freq_str[global_settings.rec_frequency], |
diff --git a/apps/settings.c b/apps/settings.c index f6c9d4f929..6649ce3f89 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -78,7 +78,7 @@ const char rec_base_directory[] = REC_BASE_DIR; | |||
78 | #include "pcm_playback.h" | 78 | #include "pcm_playback.h" |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #define CONFIG_BLOCK_VERSION 27 | 81 | #define CONFIG_BLOCK_VERSION 26 |
82 | #define CONFIG_BLOCK_SIZE 512 | 82 | #define CONFIG_BLOCK_SIZE 512 |
83 | #define RTC_BLOCK_SIZE 44 | 83 | #define RTC_BLOCK_SIZE 44 |
84 | 84 | ||
@@ -220,6 +220,7 @@ static const struct bit_entry rtc_bits[] = | |||
220 | {1, S_O(invert), false, "invert", off_on }, | 220 | {1, S_O(invert), false, "invert", off_on }, |
221 | {1, S_O(flip_display), false, "flip display", off_on }, | 221 | {1, S_O(flip_display), false, "flip display", off_on }, |
222 | /* display */ | 222 | /* display */ |
223 | {1, S_O(invert_cursor), false, "invert cursor", off_on }, | ||
223 | {1, S_O(statusbar), true, "statusbar", off_on }, | 224 | {1, S_O(statusbar), true, "statusbar", off_on }, |
224 | {1, S_O(scrollbar), true, "scrollbar", off_on }, | 225 | {1, S_O(scrollbar), true, "scrollbar", off_on }, |
225 | #if CONFIG_KEYPAD == RECORDER_PAD | 226 | #if CONFIG_KEYPAD == RECORDER_PAD |
diff --git a/apps/settings.h b/apps/settings.h index 0df93c9cf1..8387fe02a8 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -195,6 +195,8 @@ struct user_settings | |||
195 | 195 | ||
196 | int contrast; /* lcd contrast: 0-63 0=low 63=high */ | 196 | int contrast; /* lcd contrast: 0-63 0=low 63=high */ |
197 | bool invert; /* invert display */ | 197 | bool invert; /* invert display */ |
198 | bool invert_cursor; /* invert the current file in dir browser and menu | ||
199 | instead of using the default cursor */ | ||
198 | bool flip_display; /* turn display (and button layout) by 180 degrees */ | 200 | bool flip_display; /* turn display (and button layout) by 180 degrees */ |
199 | bool bidi_support; /* reverse hebrew/arabic chars: 0=off, 1=on */ | 201 | bool bidi_support; /* reverse hebrew/arabic chars: 0=off, 1=on */ |
200 | int poweroff; /* power off timer */ | 202 | int poweroff; /* power off timer */ |
diff --git a/apps/tree.c b/apps/tree.c index e9ee881c01..e56c7a76de 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -162,7 +162,7 @@ struct tree_context* tree_get_context(void) | |||
162 | /* pixel margins */ | 162 | /* pixel margins */ |
163 | #define MARGIN_X (global_settings.scrollbar && \ | 163 | #define MARGIN_X (global_settings.scrollbar && \ |
164 | tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \ | 164 | tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \ |
165 | (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0) | 165 | CURSOR_WIDTH + (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0) |
166 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) | 166 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) |
167 | 167 | ||
168 | /* position the entry-list starts at */ | 168 | /* position the entry-list starts at */ |
@@ -175,6 +175,7 @@ struct tree_context* tree_get_context(void) | |||
175 | the margins, so this is the amount of lines | 175 | the margins, so this is the amount of lines |
176 | we add to the cursor Y position to position | 176 | we add to the cursor Y position to position |
177 | it on a line */ | 177 | it on a line */ |
178 | #define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4) | ||
178 | 179 | ||
179 | #define ICON_WIDTH 6 | 180 | #define ICON_WIDTH 6 |
180 | 181 | ||
@@ -221,10 +222,11 @@ static void showfileline(int line, char* name, int attr, bool scroll) | |||
221 | if(scroll) { | 222 | if(scroll) { |
222 | #ifdef HAVE_LCD_BITMAP | 223 | #ifdef HAVE_LCD_BITMAP |
223 | lcd_setfont(FONT_UI); | 224 | lcd_setfont(FONT_UI); |
224 | lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); | 225 | if (global_settings.invert_cursor) |
225 | #else | 226 | lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); |
226 | lcd_puts_scroll(xpos, line, name); | 227 | else |
227 | #endif | 228 | #endif |
229 | lcd_puts_scroll(xpos, line, name); | ||
228 | } else | 230 | } else |
229 | lcd_puts(xpos, line, name); | 231 | lcd_puts(xpos, line, name); |
230 | 232 | ||
@@ -394,7 +396,7 @@ static int showdir(void) | |||
394 | if ( line_height > 8 ) | 396 | if ( line_height > 8 ) |
395 | offset = (line_height - 8) / 2; | 397 | offset = (line_height - 8) / 2; |
396 | lcd_mono_bitmap(icon, | 398 | lcd_mono_bitmap(icon, |
397 | CURSOR_X * 6, | 399 | CURSOR_X * 6 + CURSOR_WIDTH, |
398 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); | 400 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); |
399 | #else | 401 | #else |
400 | if (icon < 0 ) | 402 | if (icon < 0 ) |