1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

active_link.(fg|bg) -> active_link.color.(foreground|background)

This commit is contained in:
Laurent MONIN 2007-10-12 12:24:53 +02:00
parent 8df72685ce
commit e2a5696f76
4 changed files with 10 additions and 8 deletions

View File

@ -229,8 +229,8 @@ update_cached_document_options(struct session *ses)
struct active_link_options active_link;
memset(&active_link, 0, sizeof(active_link)); /* Safer. */
active_link.fg = get_opt_color("document.browse.links.active_link.colors.text", ses);
active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", ses);
active_link.color.foreground = get_opt_color("document.browse.links.active_link.colors.text", ses);
active_link.color.background = get_opt_color("document.browse.links.active_link.colors.background", ses);
active_link.enable_color = get_opt_bool("document.browse.links.active_link.enable_color", ses);
active_link.invert = get_opt_bool("document.browse.links.active_link.invert", ses);
active_link.underline = get_opt_bool("document.browse.links.active_link.underline", ses);

View File

@ -46,8 +46,8 @@ init_document_options(struct session *ses, struct document_options *doo)
#endif
doo->default_color.image_link = get_opt_color("document.colors.image", ses);
doo->active_link.fg = get_opt_color("document.browse.links.active_link.colors.text", ses);
doo->active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", ses);
doo->active_link.color.foreground = get_opt_color("document.browse.links.active_link.colors.text", ses);
doo->active_link.color.background = get_opt_color("document.browse.links.active_link.colors.background", ses);
if (get_opt_bool("document.colors.increase_contrast", ses))
doo->color_flags |= COLOR_INCREASE_CONTRAST;

View File

@ -14,8 +14,10 @@ struct active_link_options {
unsigned int underline:1;
unsigned int bold:1;
unsigned int invert:1;
color_T fg;
color_T bg;
struct {
color_T foreground;
color_T background;
} color;
};
/** This mostly acts as a option cache so rendering will be faster. However it

View File

@ -187,8 +187,8 @@ init_link_drawing(struct document_view *doc_view, struct link *link, int invert)
template.attr |= SCREEN_ATTR_BOLD;
if (doc_opts->active_link.enable_color) {
colors.foreground = doc_opts->active_link.fg;
colors.background = doc_opts->active_link.bg;
colors.foreground = doc_opts->active_link.color.foreground;
colors.background = doc_opts->active_link.color.background;
} else {
colors.foreground = link->color.foreground;
colors.background = link->color.background;