aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-06 10:10:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-07 15:33:33 +0000
commite9c3d03837bb50ec39b85ee92f2906e2bb40971f (patch)
tree49b10bdf6f75d88b35c8c4426a9bbc3522621c3c /render.c
parentconfig: use a packed bitfield for “use custom color” flags (diff)
config: add colors.jump_labels and colors.urls
* colors.jump_labels configures the foreground and background colors used when rendering URL jump labels. Defaults to “regular0 regular3” (i.e. black on yellow). * colors.urls configures the color to use when highlighting URLs in URL mode. Note that we aren’t currently doing any highlighting... Defaults to regular3 (i.e. yellow).
Diffstat (limited to 'render.c')
-rw-r--r--render.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/render.c b/render.c
index 8415ac81..040fa34a 100644
--- a/render.c
+++ b/render.c
@@ -2578,9 +2578,17 @@ render_urls(struct terminal *term)
(term->margins.left + x) / term->scale,
(term->margins.top + y) / term->scale);
+ uint32_t fg = term->conf->colors.use_custom.jump_label
+ ? term->conf->colors.jump_label.fg
+ : term->colors.table[0];
+ uint32_t bg = term->conf->colors.use_custom.jump_label
+ ? term->conf->colors.jump_label.bg
+ : term->colors.table[3];
+
+ uint16_t alpha = 0xffff;
+
render_osd(term, surf, sub_surf, buf, label,
- term->colors.table[0], term->colors.table[3], 0xf000,
- width, height, margin, margin);
+ fg, bg, alpha, width, height, margin, margin);
}
}