diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-04-07 21:12:24 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-04-07 21:32:27 +0100 |
commit | 562f4f765cd628aef65636f2ab09ed1f0606457e (patch) | |
tree | 3d058e1be2a917c57723ac973fe7b1fd80ab7e60 /desktop | |
parent | 6a7729a04f19f7eff2a68ab2777507b6d07103bf (diff) | |
download | netsurf-562f4f765cd628aef65636f2ab09ed1f0606457e.tar.gz netsurf-562f4f765cd628aef65636f2ab09ed1f0606457e.tar.bz2 |
Local history: Convert to use nscolour.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/local_history.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/desktop/local_history.c b/desktop/local_history.c index 61073793f..412e893f5 100644 --- a/desktop/local_history.c +++ b/desktop/local_history.c @@ -24,8 +24,9 @@ #include <stdlib.h> #include <string.h> -#include "utils/errors.h" #include "utils/nsurl.h" +#include "utils/errors.h" + #include "netsurf/types.h" #include "netsurf/layout.h" #include "netsurf/browser_window.h" @@ -33,6 +34,8 @@ #include "netsurf/plotters.h" #include "netsurf/keypress.h" +#include "utils/nscolour.h" + #include "desktop/cw_helper.h" #include "desktop/gui_internal.h" #include "desktop/system_colour.h" @@ -310,33 +313,19 @@ local_history_init(struct core_window_callback_table *cw_t, struct browser_window *bw, struct local_history_session **session) { - nserror res; struct local_history_session *nses; - res = ns_system_colour_char("Window", &pstyle_bg.fill_colour); - if (res != NSERROR_OK) { - return res; - } - pfstyle_node.background = pstyle_bg.fill_colour; - pfstyle_node_sel.background = pstyle_bg.fill_colour; + pstyle_bg.fill_colour = nscolours[NSCOLOUR_WIN_EVEN_BG]; + pstyle_line.stroke_colour = nscolours[NSCOLOUR_WIN_EVEN_BORDER]; - res = ns_system_colour_char("GrayText", &pstyle_line.stroke_colour); - if (res != NSERROR_OK) { - return res; - } pstyle_rect.stroke_colour = pstyle_line.stroke_colour; - pfstyle_node.foreground = pstyle_line.stroke_colour; + pstyle_rect_sel.stroke_colour = nscolours[NSCOLOUR_WIN_EVEN_BORDER]; + pstyle_rect_cursor.stroke_colour = nscolours[NSCOLOUR_SEL_BG]; - res = ns_system_colour_char("ButtonText", &pstyle_rect_sel.stroke_colour); - if (res != NSERROR_OK) { - return res; - } - pfstyle_node_sel.foreground = pstyle_rect_sel.stroke_colour; - - res = ns_system_colour_char("Highlight", &pstyle_rect_cursor.stroke_colour); - if (res != NSERROR_OK) { - return res; - } + pfstyle_node.foreground = nscolours[NSCOLOUR_WIN_EVEN_FG]; + pfstyle_node.background = nscolours[NSCOLOUR_WIN_EVEN_BG]; + pfstyle_node_sel.foreground = nscolours[NSCOLOUR_WIN_EVEN_FG]; + pfstyle_node_sel.background = nscolours[NSCOLOUR_WIN_EVEN_BG]; nses = calloc(1, sizeof(struct local_history_session)); if (nses == NULL) { |