mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 14:31:20 +03:00
Local history: Convert to use nscolour.
This commit is contained in:
parent
6a7729a04f
commit
562f4f765c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user