diff -u -r rockbox-bleeding/apps/gui/list.c rb2/apps/gui/list.c
--- rockbox-bleeding/apps/gui/list.c 2007-09-17 06:09:08.000000000 -0400
+++ rb2/apps/gui/list.c 2007-09-23 03:47:20.000000000 -0400
@@ -390,10 +390,16 @@
current_item < gui_list->selected_item + gui_list->selected_size)
{/* The selected item must be displayed scrolling */
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)/* Display inverted-line-style*/
+ if (global_settings.invert_cursor == 1)/* Display inverted-line-style*/
{
style |= STYLE_INVERT;
}
+#ifdef HAVE_LCD_COLOR
+ else if (global_settings.invert_cursor == 2)
+ {
+ style |= STYLE_HIGHLIGHT;
+ }
+#endif
else /* if (!global_settings.invert_cursor) */
{
if (current_item % gui_list->selected_size != 0)
diff -u -r rockbox-bleeding/apps/lang/english.lang rb2/apps/lang/english.lang
--- rockbox-bleeding/apps/lang/english.lang 2007-09-21 19:29:55.000000000 -0400
+++ rb2/apps/lang/english.lang 2007-09-23 03:47:20.000000000 -0400
@@ -2899,15 +2899,15 @@
user:
*: none
- lcd_bitmap: "Line Selector"
+ lcd_bitmap: "Line Selector Type"
*: none
- lcd_bitmap: "Line Selector"
+ lcd_bitmap: "Line Selector Type"
*: none
- lcd_bitmap: "Line Selector"
+ lcd_bitmap: "Line Selector Type"
@@ -11242,3 +11242,46 @@
usbstack: "Device Driver"
+
+ id: LANG_SELECTOR_COLOR
+ desc: line selector color option
+ user:
+
+ *: "Line Selector Colour"
+
+
+ *: "Line Selector Colour"
+
+
+ *: "Line Selector Colour"
+
+
+
+ id: LANG_SELECTOR_TEXT_COLOR
+ desc: line selector text color option
+ user:
+
+ *: "Line Selector Text Colour"
+
+
+ *: "Line Selector Text Colour"
+
+
+ *: "Line Selector Text Colour"
+
+
+
+ id: LANG_INVERT_CURSOR_COLOR
+ desc: in settings_menu
+ user:
+
+ *: "Bar (Colour)"
+
+
+ *: "Bar (Colour)"
+
+
+ *: "Bar (Colour)"
+
+
+
diff -u -r rockbox-bleeding/apps/menus/display_menu.c rb2/apps/menus/display_menu.c
--- rockbox-bleeding/apps/menus/display_menu.c 2007-08-26 17:34:47.000000000 -0400
+++ rb2/apps/menus/display_menu.c 2007-09-23 03:47:20.000000000 -0400
@@ -157,13 +157,40 @@
settings_save();
return res;
}
+
+static int set_ls_color(void)
+{
+ int res;
+ res = (int)set_color(&screens[SCREEN_MAIN],str(LANG_SELECTOR_COLOR),
+ &global_settings.ls_color,-1);
+
+ screens[SCREEN_MAIN].set_selector(global_settings.ls_color);
+ settings_save();
+ return res;
+}
+
+static int set_lst_color(void)
+{
+ int res;
+ res = (int)set_color(&screens[SCREEN_MAIN],str(LANG_SELECTOR_COLOR),
+ &global_settings.lst_color,global_settings.ls_color);
+
+ screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color);
+ settings_save();
+ return res;
+}
+
static int reset_color(void)
{
global_settings.fg_color = LCD_DEFAULT_FG;
global_settings.bg_color = LCD_DEFAULT_BG;
+ global_settings.ls_color = LCD_DEFAULT_LS;
+ global_settings.lst_color = LCD_DEFAULT_FG;
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
+ screens[SCREEN_MAIN].set_selector(global_settings.ls_color);
+ screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color);
settings_save();
return 0;
}
@@ -171,6 +198,10 @@
set_bg_color, NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(set_fg_col, 0, ID2P(LANG_FOREGROUND_COLOR),
set_fg_color, NULL, NULL, Icon_NOICON);
+MENUITEM_FUNCTION(set_ls_col, 0, ID2P(LANG_SELECTOR_COLOR),
+ set_ls_color, NULL, NULL, Icon_NOICON);
+MENUITEM_FUNCTION(set_lst_col, 0, ID2P(LANG_SELECTOR_TEXT_COLOR),
+ set_lst_color, NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(reset_colors, 0, ID2P(LANG_RESET_COLORS),
reset_color, NULL, NULL, Icon_NOICON);
#endif
@@ -214,7 +245,7 @@
,&clear_main_bd,
#endif
#ifdef HAVE_LCD_COLOR
- &set_bg_col, &set_fg_col, &reset_colors
+ &set_bg_col, &set_fg_col, &set_ls_col, &set_lst_col, &reset_colors
#endif
);
/* LCD MENU */
diff -u -r rockbox-bleeding/apps/screen_access.c rb2/apps/screen_access.c
--- rockbox-bleeding/apps/screen_access.c 2007-09-18 15:05:53.000000000 -0400
+++ rb2/apps/screen_access.c 2007-09-23 03:47:20.000000000 -0400
@@ -77,6 +77,10 @@
.get_foreground=&lcd_get_foreground,
.set_background=&lcd_set_background,
.set_foreground=&lcd_set_foreground,
+#ifdef HAVE_LCD_COLOR
+ .set_selector=&lcd_set_selector,
+ .set_selector_text=&lcd_set_selector_text,
+#endif
#endif /* LCD_DEPTH > 1 */
.update_rect=&lcd_update_rect,
.fillrect=&lcd_fillrect,
diff -u -r rockbox-bleeding/apps/screen_access.h rb2/apps/screen_access.h
--- rockbox-bleeding/apps/screen_access.h 2007-09-18 15:05:53.000000000 -0400
+++ rb2/apps/screen_access.h 2007-09-23 03:47:20.000000000 -0400
@@ -107,6 +107,10 @@
void (*set_background)(unsigned background);
void (*set_foreground)(unsigned foreground);
#endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */
+#if defined(HAVE_LCD_COLOR)
+ void (*set_selector)(unsigned selector);
+ void (*set_selector_text)(unsigned selector_text);
+#endif
void (*update_rect)(int x, int y, int width, int height);
void (*fillrect)(int x, int y, int width, int height);
void (*drawrect)(int x, int y, int width, int height);
diff -u -r rockbox-bleeding/apps/settings.c rb2/apps/settings.c
--- rockbox-bleeding/apps/settings.c 2007-09-19 06:41:37.000000000 -0400
+++ rb2/apps/settings.c 2007-09-23 03:47:20.000000000 -0400
@@ -778,6 +778,8 @@
#ifdef HAVE_LCD_COLOR
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
+ screens[SCREEN_MAIN].set_selector(global_settings.ls_color);
+ screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color);
#endif
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
diff -u -r rockbox-bleeding/apps/settings.h rb2/apps/settings.h
--- rockbox-bleeding/apps/settings.h 2007-09-19 06:41:37.000000000 -0400
+++ rb2/apps/settings.h 2007-09-23 03:47:20.000000000 -0400
@@ -412,7 +412,7 @@
int contrast; /* lcd contrast */
#endif
bool invert; /* invert display */
- bool invert_cursor; /* invert the current file in dir browser and menu
+ int invert_cursor; /* invert the current file in dir browser and menu
instead of using the default cursor */
bool flip_display; /* turn display (and button layout) by 180 degrees */
int poweroff; /* power off timer */
@@ -641,6 +641,8 @@
#ifdef HAVE_LCD_COLOR
int bg_color; /* background color native format */
int fg_color; /* foreground color native format */
+ int ls_color; /* background color for the selector */
+ int lst_color; /* color of the text for the selector */
#endif
bool party_mode; /* party mode - unstoppable music */
diff -u -r rockbox-bleeding/apps/settings_list.c rb2/apps/settings_list.c
--- rockbox-bleeding/apps/settings_list.c 2007-09-19 06:41:37.000000000 -0400
+++ rb2/apps/settings_list.c 2007-09-23 03:43:24.000000000 -0400
@@ -457,8 +457,15 @@
OFFON_SETTING(0,flip_display, LANG_FLIP_DISPLAY, false,"flip display", NULL),
#endif
/* display */
- BOOL_SETTING(F_TEMPVAR, invert_cursor, LANG_INVERT_CURSOR, true ,"invert cursor", off_on,
- LANG_INVERT_CURSOR_BAR, LANG_INVERT_CURSOR_POINTER, NULL),
+ CHOICE_SETTING(F_TEMPVAR|F_THEMESETTING, invert_cursor, LANG_INVERT_CURSOR, 1,
+ #ifdef HAVE_LCD_COLOR
+ "selector type", "pointer,bar (inverse),bar (color)", NULL, 3,
+ ID2P(LANG_INVERT_CURSOR_POINTER), ID2P(LANG_INVERT_CURSOR_BAR),
+ ID2P(LANG_INVERT_CURSOR_COLOR)),
+ #else
+ "selector type", "pointer,bar (inverse)", NULL, 2,
+ ID2P(LANG_INVERT_CURSOR_POINTER), ID2P(LANG_INVERT_CURSOR_BAR)),
+ #endif
OFFON_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar,
LANG_STATUS_BAR, true,"statusbar", NULL),
OFFON_SETTING(0,scrollbar, LANG_SCROLL_BAR, true,"scrollbar", NULL),
@@ -625,6 +632,10 @@
"foreground color",NULL,UNUSED},
{F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.bg_color,-1,INT(LCD_DEFAULT_BG),
"background color",NULL,UNUSED},
+ {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.ls_color,-1,INT(LCD_DEFAULT_LS),
+ "line selector color",NULL,UNUSED},
+ {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lst_color,-1,INT(LCD_DEFAULT_FG),
+ "line selector text color",NULL,UNUSED},
#endif
/* more playback */
OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
Only in rb2: build
diff -u -r rockbox-bleeding/firmware/drivers/lcd-16bit.c rb2/firmware/drivers/lcd-16bit.c
--- rockbox-bleeding/firmware/drivers/lcd-16bit.c 2007-09-21 11:52:27.000000000 -0400
+++ rb2/firmware/drivers/lcd-16bit.c 2007-09-23 03:31:26.000000000 -0400
@@ -5,7 +5,7 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
- * $Id: lcd-16bit.c 14805 2007-09-21 15:51:53Z aliask $
+ * $Id: lcd-16bit.c 14035 2007-07-28 08:12:05Z jethead71 $
*
* Copyright (C) 2005 by Dave Chapman
*
@@ -51,9 +51,13 @@
#if !defined(TOSHIBA_GIGABEAT_F) || defined(SIMULATOR)
static unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG;
static unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG;
+static unsigned ls_pattern IDATA_ATTR = LCD_DEFAULT_LS;
+static unsigned lst_pattern IDATA_ATTR = LCD_DEFAULT_FG;
#else
unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG;
unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG;
+unsigned ls_pattern IDATA_ATTR = LCD_DEFAULT_LS;
+unsigned lst_pattern IDATA_ATTR = LCD_DEFAULT_FG;
#endif
static int drawmode = DRMODE_SOLID;
@@ -103,6 +107,16 @@
return bg_pattern;
}
+void lcd_set_selector(unsigned color)
+{
+ ls_pattern = color;
+}
+
+void lcd_set_selector_text(unsigned color)
+{
+ lst_pattern = color;
+}
+
void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
{
lcd_set_drawmode(mode);
@@ -668,8 +682,7 @@
lcd_bitmap_part(src, 0, 0, width, x, y, width, height);
}
-#if !defined(TOSHIBA_GIGABEAT_F) && !defined(TOSHIBA_GIGABEAT_S) \
- || defined(SIMULATOR)
+#if !defined(TOSHIBA_GIGABEAT_F) || defined(SIMULATOR)
/* Draw a partial native bitmap */
void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
int stride, int x, int y, int width,
@@ -796,7 +809,10 @@
int lastmode = drawmode;
int oldfgcolor = fg_pattern;
int oldbgcolor = bg_pattern;
-
+ int h_r = _RGB_UNPACK_RED(ls_pattern);
+ int h_b = _RGB_UNPACK_BLUE(ls_pattern);
+ int h_g = _RGB_UNPACK_GREEN(ls_pattern);
+ int count=0;
/* make sure scrolling is turned off on the line we are updating */
lcd_scroll_info.lines &= ~(1 << y);
@@ -808,16 +824,35 @@
ypos = ymargin + y*h;
drawmode = (style & STYLE_INVERT) ?
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
- if (style & STYLE_COLORED) {
+ if (style & STYLE_HIGHLIGHT) {
+ fg_pattern = ls_pattern;
+ }
+ else if (style & STYLE_COLORED) {
if (drawmode == DRMODE_SOLID)
fg_pattern = style & STYLE_COLOR_MASK;
else
bg_pattern = style & STYLE_COLOR_MASK;
}
- lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
xrect = xpos + MAX(w - offset, 0);
+ if (style & STYLE_HIGHLIGHT) {
+ drawmode = DRMODE_FG;
+ for(count = 0; count<=h;count++) {
+ lcd_hline(0, LCD_WIDTH , ypos + count);
+ h_r-= h_r/h;
+ h_g-= h_g/h;
+ h_b-= h_b/h;
+ fg_pattern = _RGBPACK(h_r,h_g,h_b);
+ }
+ fg_pattern = lst_pattern;
+ }
+ else
+ {
lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
+ drawmode = (style & STYLE_INVERT) ?
+ (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
+ }
+ lcd_putsxyofs(xpos, ypos, offset, str);
drawmode = lastmode;
fg_pattern = oldfgcolor;
bg_pattern = oldbgcolor;
@@ -852,7 +887,10 @@
s->start_tick = current_tick + lcd_scroll_info.delay;
s->invert = false;
if (style & STYLE_INVERT) {
- s->invert = true;
+ s->invert = 1;
+ }
+ else if (style & STYLE_HIGHLIGHT) {
+ s->invert = 2;
}
lcd_puts_style_offset(x,y,string,style,offset);
@@ -908,6 +946,11 @@
int lastmode;
unsigned old_fgcolor = fg_pattern;
unsigned old_bgcolor = bg_pattern;
+ int h_r = _RGB_UNPACK_RED(ls_pattern);
+ int h_b = _RGB_UNPACK_BLUE(ls_pattern);
+ int h_g = _RGB_UNPACK_GREEN(ls_pattern);
+ int count=0;
+
for ( index = 0; index < LCD_SCROLLABLE_LINES; index++ ) {
/* really scroll? */
@@ -961,8 +1004,20 @@
}
lastmode = drawmode;
- drawmode = s->invert ?
+ drawmode = s->invert == 1 ?
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
+ if (s->invert == 2) {
+ fg_pattern = ls_pattern;
+ drawmode = DRMODE_FG;
+ for(count = 0; count<=pf->height;count++) {
+ lcd_hline(0, LCD_WIDTH , ypos + count);
+ h_r-= h_r/pf->height;
+ h_g-= h_g/pf->height;
+ h_b-= h_b/pf->height;
+ fg_pattern = _RGBPACK(h_r,h_g,h_b);
+ }
+ fg_pattern = lst_pattern;
+ }
lcd_putsxyofs(xpos, ypos, s->offset, s->line);
drawmode = lastmode;
lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
Only in rb2/firmware/drivers: lcd-16bit.c.orig
diff -u -r rockbox-bleeding/firmware/export/lcd.h rb2/firmware/export/lcd.h
--- rockbox-bleeding/firmware/export/lcd.h 2007-07-31 08:43:33.000000000 -0400
+++ rb2/firmware/export/lcd.h 2007-09-23 03:47:20.000000000 -0400
@@ -27,6 +27,7 @@
#define STYLE_DEFAULT 0x00000000
#define STYLE_INVERT 0x20000000
#define STYLE_COLORED 0x10000000
+#define STYLE_HIGHLIGHT 0x40000000
#define STYLE_COLOR_MASK 0x0000FFFF
#ifdef SIMULATOR
@@ -231,6 +232,7 @@
#define LCD_WHITE LCD_RGBPACK(255, 255, 255)
#define LCD_DEFAULT_FG LCD_BLACK
#define LCD_DEFAULT_BG LCD_RGBPACK(182, 198, 229) /* rockbox blue */
+#define LCD_DEFAULT_LS LCD_WHITE
#elif LCD_DEPTH > 1 /* greyscale */
@@ -353,6 +355,10 @@
extern unsigned lcd_get_foreground(void);
extern void lcd_set_background(unsigned background);
extern unsigned lcd_get_background(void);
+#ifdef HAVE_LCD_COLOR
+extern void lcd_set_selector(unsigned selector);
+extern void lcd_set_selector_text(unsigned selector_text);
+#endif
extern void lcd_set_drawinfo(int mode, unsigned foreground,
unsigned background);
void lcd_set_backdrop(fb_data* backdrop);
diff -u -r rockbox-bleeding/firmware/export/scroll_engine.h rb2/firmware/export/scroll_engine.h
--- rockbox-bleeding/firmware/export/scroll_engine.h 2007-07-28 04:12:36.000000000 -0400
+++ rb2/firmware/export/scroll_engine.h 2007-09-23 03:47:20.000000000 -0400
@@ -43,8 +43,12 @@
int startx;
#ifdef HAVE_LCD_BITMAP
int width; /* length of line in pixels */
- bool invert; /* invert the scrolled text */
+#ifdef HAVE_LCD_COLOR
+ int invert; /* invert the scrolled text */
+#else
+ bool invert;
#endif
+#endif/* HAVE_LCD_BITMAP */
bool backward; /* scroll presently forward or backward? */
bool bidir;
long start_tick;
Only in rb2/tools: bmp2rb
Only in rb2/tools: codepages
Only in rb2/tools: convbdf
Only in rb2/tools: gigabeat.o
Only in rb2/tools: gigabeats.o
Only in rb2/tools: iriver.o
Only in rb2/tools: mi4.o
Only in rb2/tools: rdf2binary
Only in rb2/tools: scramble
Only in rb2/tools: scramble.o