From 013b26d21221795d1107a74e28f5008a16864049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 4 Feb 2021 19:43:47 +0100 Subject: [PATCH] render: urls: tweak positioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t offset the labels too much vertically, _or_ horizontally. --- render.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/render.c b/render.c index 710ef4a0..451b0ff3 100644 --- a/render.c +++ b/render.c @@ -2563,13 +2563,15 @@ render_urls(struct terminal *term) term->wl->shm, width, height, shm_cookie_url(url), false, 1); const struct coord *pos = &url->start; - int x = pos->col * term->cell_width - 2 * term->cell_width; - int y = pos->row * term->cell_height - term->cell_height; + int x = pos->col * term->cell_width - 15 * term->cell_width / 10; + int y = pos->row * term->cell_height - 5 * term->cell_height / 10; if (x < 0) - x += 4 * term->cell_width; + x = 0; +#if 0 if (y < 0) - y += 2 * term->cell_height; + y += 15 * term->cell_height / 10; +#endif wl_subsurface_set_position( sub_surf,