From 6a7729a04f19f7eff2a68ab2777507b6d07103bf Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 7 Apr 2020 21:10:30 +0100 Subject: Scrollbar: Convert to use nscolour. --- desktop/scrollbar.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'desktop') diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c index af5536ba4..90ea924cc 100644 --- a/desktop/scrollbar.c +++ b/desktop/scrollbar.c @@ -29,6 +29,7 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/utils.h" +#include "utils/nscolour.h" #include "utils/nsoption.h" #include "netsurf/browser_window.h" #include "netsurf/mouse.h" @@ -250,29 +251,17 @@ scrollbar_redraw(struct scrollbar *s, plot_style_t bg_fill_style = { .fill_type = PLOT_OP_TYPE_SOLID, + .fill_colour = nscolours[NSCOLOUR_SCROLL_WELL], }; plot_style_t fg_fill_style = { .fill_type = PLOT_OP_TYPE_SOLID, + .fill_colour = nscolours[NSCOLOUR_BUTTON_BG], }; plot_style_t arrow_fill_style = { .fill_type = PLOT_OP_TYPE_SOLID, + .fill_colour = nscolours[NSCOLOUR_BUTTON_FG], }; - res = ns_system_colour_char("Scrollbar", &bg_fill_style.fill_colour); - if (res != NSERROR_OK) { - return res; - } - - res = ns_system_colour_char("ButtonFace", &fg_fill_style.fill_colour); - if (res != NSERROR_OK) { - return res; - } - - res = ns_system_colour_char("ButtonText", &arrow_fill_style.fill_colour); - if (res != NSERROR_OK) { - return res; - } - area.x0 = x; area.y0 = y; area.x1 = x + (s->horizontal ? s->length : SCROLLBAR_WIDTH) - 1; -- cgit v1.2.3