summaryrefslogtreecommitdiff
path: root/render/html_redraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html_redraw.c')
-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,