diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2009-02-19 00:00:10 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2009-02-19 00:00:10 +0000 |
commit | 8aa291df0f63bb152d6d2893f361f6ae06fe06d7 (patch) | |
tree | b43af9e66d8d97b5d4bd6435dcd6cd9f7d169a54 /framebuffer/fb_rootwindow.c | |
parent | b04c72fc0fc0340adeeeb5d88ca1b59bba721636 (diff) | |
download | netsurf-8aa291df0f63bb152d6d2893f361f6ae06fe06d7.tar.gz netsurf-8aa291df0f63bb152d6d2893f361f6ae06fe06d7.tar.bz2 |
Don't outline all text widgets.
svn path=/trunk/netsurf/; revision=6569
Diffstat (limited to 'framebuffer/fb_rootwindow.c')
-rw-r--r-- | framebuffer/fb_rootwindow.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/framebuffer/fb_rootwindow.c b/framebuffer/fb_rootwindow.c index 979ca3f54..dd04ff726 100644 --- a/framebuffer/fb_rootwindow.c +++ b/framebuffer/fb_rootwindow.c @@ -67,6 +67,7 @@ struct fb_widget { int height; colour bg; colour fg; + bool outline; /* handlers */ fb_widget_mouseclick_t click; @@ -131,11 +132,13 @@ fb_redraw_widget(struct fb_widget *widget) break; case FB_WIDGET_TYPE_TEXT: - if (widget->text != NULL) { + if (widget->outline) { plot.rectangle(fb_plot_ctx.x0, fb_plot_ctx.y0, fb_plot_ctx.x1 - fb_plot_ctx.x0 - 1, fb_plot_ctx.y1 - fb_plot_ctx.y0 - 1, 1, 0x00000000, false, false); + } + if (widget->text != NULL) { plot.text(fb_plot_ctx.x0 + 2, fb_plot_ctx.y0 + 15, NULL, @@ -230,6 +233,7 @@ fb_add_button_widget(int x, new_widget->y = y; new_widget->width = widget_image->width; new_widget->height = widget_image->height; + new_widget->outline = false; new_widget->click = click_rtn; @@ -249,7 +253,7 @@ fb_add_button_widget(int x, } static struct fb_widget * -fb_add_text_widget(int x, int y, int width, int height, colour bg, fb_widget_input_t input_rtn) +fb_add_text_widget(int x, int y, int width, int height, colour bg, bool outline, fb_widget_input_t input_rtn) { struct fb_widget *new_widget; new_widget = calloc(1, sizeof(struct fb_widget)); @@ -263,6 +267,7 @@ fb_add_text_widget(int x, int y, int width, int height, colour bg, fb_widget_inp new_widget->height = height; new_widget->bg = bg; new_widget->fg = FB_COLOUR_BLACK; + new_widget->outline = outline; new_widget->input = input_rtn; @@ -288,6 +293,7 @@ fb_add_window_widget(struct gui_window *g, new_widget->width = g->width; new_widget->height = g->height; new_widget->bg = bg; + new_widget->outline = false; new_widget->click = click_rtn; new_widget->input = input_rtn; @@ -414,7 +420,7 @@ void fb_rootwindow_create(framebuffer_t *fb) (newwidget->x + newwidget->width + 5) - (25 + 10), 22, - FB_COLOUR_WHITE, + FB_COLOUR_WHITE, true, fb_widget_url_input); @@ -423,7 +429,7 @@ void fb_rootwindow_create(framebuffer_t *fb) */ status_widget = fb_add_text_widget(0, fb->height - 20, fb->width - 200, 20, - FB_FRAME_COLOUR, + FB_FRAME_COLOUR, false, NULL); } |