Return a colour (ABGR) from gui_system_colour_char() rather than a

css_color (ARGB)

svn path=/trunk/netsurf/; revision=13744
This commit is contained in:
Chris Young 2012-03-27 19:25:02 +00:00
parent 4ecf9f9bca
commit f0dbe1d689
1 changed files with 7 additions and 2 deletions

View File

@ -241,7 +241,7 @@ static struct gui_system_colour_ctx colour_list[] = {
SLEN("WindowText"),
0xff000000,
&nsoption_colour(sys_colour_WindowText),
INACTIVEFILLTEXTPEN,
TEXTPEN,
NULL
},
@ -307,6 +307,11 @@ void gui_system_colour_finalize(void)
gui_system_colour_pw = NULL;
}
colour ami_css_color_to_colour(css_color c)
{
return (c & 0xFF00FF00) | ((c >> 16) & 0xFF) | ((c & 0xFF) << 16);
}
colour gui_system_colour_char(const char *name)
{
colour ret = 0xff00000;
@ -314,7 +319,7 @@ colour gui_system_colour_char(const char *name)
for (ccount = 0; ccount < colour_list_len; ccount++) {
if (strcmp(name, colour_list[ccount].name) == 0) {
ret = colour_list[ccount].colour;
ret = ami_css_color_to_colour(colour_list[ccount].colour);
break;
}
}