aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-22 12:27:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-29 13:38:22 +0000
commitb65612479135da9bf888fcd037c86519940e17b4 (patch)
treee8b5295ca18910e7502baec26695b90885a5ae81
parentrender: draw_unfocused_block(): round scale, instead of truncating (diff)
render: csd_border: round scaled border width, instead of truncating
-rw-r--r--render.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/render.c b/render.c
index e62e000d..f87ef093 100644
--- a/render.c
+++ b/render.c
@@ -2012,9 +2012,9 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx,
* The “visible” border.
*/
- int scale = term->scale;
- int bwidth = term->conf->csd.border_width * scale;
- int vwidth = term->conf->csd.border_width_visible * scale; /* Visible size */
+ float scale = term->scale;
+ int bwidth = round(term->conf->csd.border_width * scale);
+ int vwidth = round(term->conf->csd.border_width_visible * scale); /* Visible size */
xassert(bwidth >= vwidth);
@@ -2067,7 +2067,6 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx,
uint16_t alpha = _color >> 24 | (_color >> 24 << 8);
pixman_color_t color = color_hex_to_pixman_with_alpha(_color, alpha);
-
pixman_image_fill_rectangles(
PIXMAN_OP_SRC, buf->pix[0], &color, 1,
&(pixman_rectangle16_t){x, y, w, h});