summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-03-14 10:08:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-03-14 10:08:58 +0000
commit885ce428a981d7248d5f5088627164fdea8f391c (patch)
tree3b18440528c13c8ec330dc85a04f149e08053e5a /render
parentb087dfb3da07766aa98b048011a99d5b7c4169bf (diff)
downloadnetsurf-885ce428a981d7248d5f5088627164fdea8f391c.tar.gz
netsurf-885ce428a981d7248d5f5088627164fdea8f391c.tar.bz2
Ensure that scrollbar foreground is actually visible (black on black, for example, isn't very usable)
svn path=/trunk/netsurf/; revision=3950
Diffstat (limited to 'render')
-rw-r--r--render/html_redraw.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c
index f3017f0f7..8c66a1035 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -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,