mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -04:00
render: urls: tweak positioning
Don’t offset the labels too much vertically, _or_ horizontally.
This commit is contained in:
parent
d69497efe4
commit
013b26d212
1 changed files with 6 additions and 4 deletions
10
render.c
10
render.c
|
|
@ -2563,13 +2563,15 @@ render_urls(struct terminal *term)
|
||||||
term->wl->shm, width, height, shm_cookie_url(url), false, 1);
|
term->wl->shm, width, height, shm_cookie_url(url), false, 1);
|
||||||
|
|
||||||
const struct coord *pos = &url->start;
|
const struct coord *pos = &url->start;
|
||||||
int x = pos->col * term->cell_width - 2 * term->cell_width;
|
int x = pos->col * term->cell_width - 15 * term->cell_width / 10;
|
||||||
int y = pos->row * term->cell_height - term->cell_height;
|
int y = pos->row * term->cell_height - 5 * term->cell_height / 10;
|
||||||
|
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
x += 4 * term->cell_width;
|
x = 0;
|
||||||
|
#if 0
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
y += 2 * term->cell_height;
|
y += 15 * term->cell_height / 10;
|
||||||
|
#endif
|
||||||
|
|
||||||
wl_subsurface_set_position(
|
wl_subsurface_set_position(
|
||||||
sub_surf,
|
sub_surf,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue