r13744 chris_y - /trunk/netsurf/amiga/system_colour.c

netsurf at semichrome.net netsurf at semichrome.net
Tue Mar 27 20:25:02 BST 2012


Author: chris_y
Date: Tue Mar 27 14:25:02 2012
New Revision: 13744

URL: http://source.netsurf-browser.org?rev=13744&view=rev
Log:
Return a colour (ABGR) from gui_system_colour_char() rather than a
css_color (ARGB)

Modified:
    trunk/netsurf/amiga/system_colour.c

Modified: trunk/netsurf/amiga/system_colour.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/system_colour.c?rev=13744&r1=13743&r2=13744&view=diff
==============================================================================
--- trunk/netsurf/amiga/system_colour.c (original)
+++ trunk/netsurf/amiga/system_colour.c Tue Mar 27 14:25:02 2012
@@ -241,7 +241,7 @@
 		SLEN("WindowText"), 
 		0xff000000, 
 		&nsoption_colour(sys_colour_WindowText), 
-		INACTIVEFILLTEXTPEN,
+		TEXTPEN,
 		NULL 
 	},
 
@@ -307,6 +307,11 @@
 	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 @@
 
 	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;
 		}
 	}




More information about the netsurf-commits mailing list