diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-12 18:10:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-12 18:10:58 +0000 |
| commit | 4ed545f4d8bb638d6e14d2cfcc7e45cda443745b (patch) | |
| tree | 4c3c9b6ae38c63d926390a5f2e95b579f9de4808 /render.c | |
| parent | Merge branch 'remove-plasma-quirk' (diff) | |
| parent | render: force underlines to be visible (diff) | |
Merge branch 'no-underlines-below-cell'
Closes #503
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -317,11 +317,14 @@ 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) { + /* Make sure the line isn't positioned below the cell */ + int y_ofs = font_baseline(term) - font->underline.position; + y_ofs = min(y_ofs, term->cell_height - font->underline.thickness); + pixman_image_fill_rectangles( PIXMAN_OP_SRC, pix, color, 1, &(pixman_rectangle16_t){ - x, y + font_baseline(term) - font->underline.position, - cols * term->cell_width, font->underline.thickness}); + x, y + y_ofs, cols * term->cell_width, font->underline.thickness}); } static void |
