mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
render: urls: reduce vertical margin
This commit is contained in:
parent
19e23254fb
commit
672c414b91
1 changed files with 6 additions and 5 deletions
11
render.c
11
render.c
|
|
@ -2598,9 +2598,10 @@ render_urls(struct terminal *term)
|
||||||
size_t len = wcslen(label);
|
size_t len = wcslen(label);
|
||||||
int cols = wcswidth(label, len);
|
int cols = wcswidth(label, len);
|
||||||
|
|
||||||
const int margin = 2 * term->scale;
|
const int x_margin = 2 * term->scale;
|
||||||
int width = 2 * margin + cols * term->cell_width;
|
const int y_margin = 1 * term->scale;
|
||||||
int height = 2 * margin + term->cell_height;
|
int width = 2 * x_margin + cols * term->cell_width;
|
||||||
|
int height = 2 * y_margin + term->cell_height;
|
||||||
|
|
||||||
struct buffer *buf = shm_get_buffer(
|
struct buffer *buf = shm_get_buffer(
|
||||||
term->wl->shm, width, height, shm_cookie_url(url), false, 1);
|
term->wl->shm, width, height, shm_cookie_url(url), false, 1);
|
||||||
|
|
@ -2636,12 +2637,12 @@ render_urls(struct terminal *term)
|
||||||
uint16_t alpha = 0xffff;
|
uint16_t alpha = 0xffff;
|
||||||
|
|
||||||
render_osd(term, surf, sub_surf, buf, label,
|
render_osd(term, surf, sub_surf, buf, label,
|
||||||
fg, bg, alpha, width, height, margin, margin);
|
fg, bg, alpha, width, height, x_margin, y_margin);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* TODO: somehow highlight the key(s) entered so far */
|
/* TODO: somehow highlight the key(s) entered so far */
|
||||||
pixman_color_t color = color_hex_to_pixman(fg);
|
pixman_color_t color = color_hex_to_pixman(fg);
|
||||||
draw_strikeout(term, buf->pix[0], term->fonts[0], &color, margin, margin, entered_key_len);
|
draw_strikeout(term, buf->pix[0], term->fonts[0], &color, x_margin, y_margin, entered_key_len);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue