Rockbox

Tasklist

FS#5532 - System messages (gui_syncsplash) are always displayed in black (regardless of settings)

Attached to Project: Rockbox
Opened by V-Turn (V-Turn) - Monday, 12 June 2006, 07:15 GMT
Last edited by Nicolas Pennequin (nicolas_p) - Monday, 02 October 2006, 19:44 GMT
Task Type Bugs
Category LCD
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I am using a theme with a black background. While I am able to control the color of the font from the .cfg file (using the "foreground color" property), however, it seems that the "system" messages (like "committing tagcache") or other warning messages are still displayed in black, hence are invisible. The back color seems to be hardcoded somewhere, and should (I believe) use the "foreground color" setting (or even better, a third setting for better visibility) instead.
This task depends upon

Closed by  Michael Sevakis (MikeS)
Friday, 13 October 2006, 12:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  Found this bothersome myself and fixed it without any knowledge of this task. Splashes will always have lightgray for the background with black text even with backdrops.
Comment by V-Turn (V-Turn) - Tuesday, 13 June 2006, 16:13 GMT
I have looked into the code and found the cause of this issue :

R:\\rockbox-devel\\apps\\gui\\splash.c
-----------------------------------------
#if LCD_DEPTH > 1
if(screen->depth>1) {
prevbg = screen->get_background();
prevfg = screen->get_foreground();
screen->set_background(LCD_LIGHTGRAY);
screen->set_foreground(LCD_BLACK);
}
#endif
screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
screen->fillrect(xx, y-2, maxw+4, screen->height-y*2+4);
screen->set_drawmode(DRMODE_SOLID);
screen->drawrect(xx, y-2, maxw+4, screen->height-y*2+4);
-----------------------------------------

I was able to fix the issue by replaing the code by the thing below. However I am very uncomfortable with the rockbox graphics API, so I'd like some review before I submit this patch... It does wotk for me, but would break other builds!
-----------------------------------------
#if LCD_DEPTH > 1
if(screen->depth>1) {
prevbg = screen->get_background();
prevfg = screen->get_foreground();
screen->set_drawmode(DRMODE_FG);
screen->set_background(LCD_LIGHTGRAY);
screen->fillrect(xx, y-2, maxw+4, screen->height-y*2+4);
screen->set_foreground(LCD_BLACK);
screen->drawrect(xx, y-2, maxw+4, screen->height-y*2+4);

}
else {
screen->set_drawmode(DRMODE_INVERSEVID);
screen->fillrect(xx, y-2, maxw+4, screen->height-y*2+4);
screen->set_drawmode(DRMODE_SOLID);
screen->drawrect(xx, y-2, maxw+4, screen->height-y*2+4);
}
#endif
-----------------------------------------

V.
Comment by Phil Jones (slappyhaze) - Saturday, 24 June 2006, 11:58 GMT
I would like to check the progress of this problem, its relevant to me, as I also use a black wps.

Loading...