mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-14 08:21:27 -04:00
config: add url.style=none|single|double|curly|dotted|dashed
This option allows you to configure which underline style to use with URLs. The default is dotted. Since before this patch, URL underlines were always plain underlines, this means the default URL underline style has changed, from single to dotted. Closes #2302
This commit is contained in:
parent
ecf3b864e4
commit
2c454a71f1
8 changed files with 50 additions and 11 deletions
7
render.c
7
render.c
|
|
@ -1171,13 +1171,16 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
|||
if (cell->attrs.strikethrough)
|
||||
draw_strikeout(term, pix, font, &fg, x, y, cell_cols);
|
||||
|
||||
if (unlikely(cell->attrs.url)) {
|
||||
if (unlikely(cell->attrs.url && term->conf->url.style != UNDERLINE_NONE)) {
|
||||
pixman_color_t url_color = color_hex_to_pixman(
|
||||
term->conf->colors_dark.use_custom.url
|
||||
? term->conf->colors_dark.url
|
||||
: term->colors.table[3],
|
||||
gamma_correct);
|
||||
draw_underline(term, pix, font, &url_color, x, y, cell_cols);
|
||||
|
||||
draw_styled_underline(
|
||||
term, pix, font, &url_color, term->conf->url.style,
|
||||
x, y, cell_cols);
|
||||
}
|
||||
|
||||
draw_cursor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue