Ensure that scrollbar foreground is actually visible (black on black, for example, isn't very usable)

svn path=/trunk/netsurf/; revision=3950
This commit is contained in:
John Mark Bell 2008-03-14 10:08:58 +00:00
parent b087dfb3da
commit 885ce428a9

View File

@ -1478,8 +1478,16 @@ bool html_redraw_scrollbars(struct box *box, float scale,
bool vscroll, hscroll;
int well_height, bar_top, bar_height;
int well_width, bar_left, bar_width;
const colour vcolour = box->style->border[RIGHT].color;
const colour hcolour = box->style->border[BOTTOM].color;
colour vcolour = box->style->border[RIGHT].color;
colour hcolour = box->style->border[BOTTOM].color;
/** \todo We probably want to clamp to either end of the spectrum,
* rather than simply taking the inverse colour. */
if (vcolour == TRANSPARENT || vcolour == background_colour)
vcolour = background_colour ^ 0xffffff;
if (hcolour == TRANSPARENT || hcolour == background_colour)
hcolour = background_colour ^ 0xffffff;
box_scrollbar_dimensions(box, padding_width, padding_height, w,
&vscroll, &hscroll,