diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-06 22:04:46 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-07 15:33:34 +0000 |
| commit | 672c414b91eaa6a1a46c1ea8de14cae7f63faca3 (patch) | |
| tree | 100a35153a1d121ec2c3821844c27ef0a30a9d97 /render.c | |
| parent | render: urls: uppercase the activation key sequence (diff) | |
render: urls: reduce vertical margin
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -2598,9 +2598,10 @@ render_urls(struct terminal *term) size_t len = wcslen(label); int cols = wcswidth(label, len); - const int margin = 2 * term->scale; - int width = 2 * margin + cols * term->cell_width; - int height = 2 * margin + term->cell_height; + const int x_margin = 2 * term->scale; + const int y_margin = 1 * term->scale; + int width = 2 * x_margin + cols * term->cell_width; + int height = 2 * y_margin + term->cell_height; struct buffer *buf = shm_get_buffer( term->wl->shm, width, height, shm_cookie_url(url), false, 1); @@ -2636,12 +2637,12 @@ render_urls(struct terminal *term) uint16_t alpha = 0xffff; 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 /* TODO: somehow highlight the key(s) entered so far */ 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 } } |
