mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-18 22:05:25 -05:00
config: add setting for underline thickness
This adds an "underline-thickness" setting to the "main" section, similar to the existing "underline-offset" setting. This setting is used to specify a custom height for regular (= non-cursor) underlines. Fixes #1136
This commit is contained in:
parent
65ecb77737
commit
a0942f950d
7 changed files with 29 additions and 1 deletions
5
render.c
5
render.c
|
|
@ -372,7 +372,10 @@ draw_underline(const struct terminal *term, pixman_image_t *pix,
|
|||
const struct fcft_font *font,
|
||||
const pixman_color_t *color, int x, int y, int cols)
|
||||
{
|
||||
const int thickness = font->underline.thickness;
|
||||
const int thickness = term->conf->underline_thickness.px >= 0
|
||||
? term_pt_or_px_as_pixels(
|
||||
term, &term->conf->underline_thickness)
|
||||
: font->underline.thickness;
|
||||
|
||||
/* Make sure the line isn't positioned below the cell */
|
||||
const int y_ofs = min(underline_offset(term, font),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue