mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 14:07:05 +03:00
Fix colour component combination. Render text as valid #xxxxxx too.
svn path=/trunk/netsurf/; revision=11737
This commit is contained in:
parent
675a07083a
commit
f8c5eeb70a
@ -529,13 +529,13 @@ int snoptionf(char *string, size_t size, unsigned int option, const char *fmt)
|
||||
break;
|
||||
|
||||
case OPTION_COLOUR:
|
||||
rgbcolour = ((0x000000FF | *((colour *)
|
||||
option_entry->p)) << 16) &
|
||||
((0x0000FF00 | *((colour *)
|
||||
option_entry->p)) << 0) &
|
||||
((0x00FF0000 | *((colour *)
|
||||
rgbcolour = ((0x000000FF & *((colour *)
|
||||
option_entry->p)) << 16) |
|
||||
((0x0000FF00 & *((colour *)
|
||||
option_entry->p)) << 0) |
|
||||
((0x00FF0000 & *((colour *)
|
||||
option_entry->p)) >> 16);
|
||||
slen += snprintf(string + slen, size - slen, "<span style=\"background-color: #%06x; color: #%06x;\">%x</span>", rgbcolour, (~rgbcolour) & 0xffffff, rgbcolour);
|
||||
slen += snprintf(string + slen, size - slen, "<span style=\"background-color: #%06x; color: #%06x;\">#%06x</span>", rgbcolour, (~rgbcolour) & 0xffffff, rgbcolour);
|
||||
break;
|
||||
|
||||
case OPTION_STRING:
|
||||
|
Loading…
Reference in New Issue
Block a user