From 7ba4f766b64f2a801437829202ed2519e921e9dd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 28 Dec 2009 23:53:02 +0000 Subject: Change scrollbar rendering colours and offsets a bit. Could use some more attention. svn path=/trunk/netsurf/; revision=9764 --- framebuffer/fbtk.c | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'framebuffer') diff --git a/framebuffer/fbtk.c b/framebuffer/fbtk.c index 05f46dd5c..4361734a1 100644 --- a/framebuffer/fbtk.c +++ b/framebuffer/fbtk.c @@ -386,21 +386,18 @@ fb_redraw_hscroll(fbtk_widget_t *root, fbtk_widget_t *widget, void *pw) rect = bbox; + /* background */ nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->bg); + /* scroll well */ rect.x0 = bbox.x0 + 1; - rect.y0 = bbox.y0 + 3; - rect.x1 = bbox.x1 - 1; - rect.y1 = bbox.y1 - 3; - - nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->fg); - - rect.x0 = bbox.x0; rect.y0 = bbox.y0 + 2; - rect.x1 = bbox.x1 - 1; - rect.y1 = bbox.y1 - 5; + rect.x1 = bbox.x1 - 2; + rect.y1 = bbox.y1 - 2; + nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->fg); - nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF000000, false, false); + /* scroll well outline */ + nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF707070, false, false); hscroll = ((widget->width - 4) * widget->u.scroll.pct) / 100 ; hpos = ((widget->width - 4) * widget->u.scroll.pos) / 100 ; @@ -434,31 +431,28 @@ fb_redraw_vscroll(fbtk_widget_t *root, fbtk_widget_t *widget, void *pw) rect = bbox; + /* background */ nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->bg); - rect.x0 = bbox.x0 + 1; - rect.y0 = bbox.y0 + 3; - rect.x1 = bbox.x1 - 1; - rect.y1 = bbox.y1 - 3; - + rect.x0 = bbox.x0 + 2; + rect.y0 = bbox.y0 + 1; + rect.x1 = bbox.x1 - 2; + rect.y1 = bbox.y1 - 2; nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->fg); - rect.x0 = bbox.x0; - rect.y0 = bbox.y0 + 2; - rect.x1 = bbox.x1 - 1; - rect.y1 = bbox.y1 - 5; - - nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF000000, false, false); + /* scroll well */ + nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF707070, false, false); + /* scroll well outline */ vscroll = ((widget->height - 4) * widget->u.scroll.pct) / 100 ; vpos = ((widget->height - 4) * widget->u.scroll.pos) / 100 ; LOG(("scroll %d",vscroll)); - rect.x0 = bbox.x0 + 3 ; - rect.y0 = bbox.y0 + 5 + vpos; - rect.x1 = bbox.x0 + widget->width - 3; - rect.y1 = bbox.y0 + vscroll + vpos - 5; + rect.x0 = bbox.x0 + 5; + rect.y0 = bbox.y0 + 3 + vpos; + rect.x1 = bbox.x0 + widget->width - 5; + rect.y1 = bbox.y0 + vscroll + vpos; nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->bg); -- cgit v1.2.3