mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
render: csd_border: round scaled border width, instead of truncating
This commit is contained in:
parent
44743b5635
commit
b656124791
1 changed files with 3 additions and 4 deletions
7
render.c
7
render.c
|
|
@ -2012,9 +2012,9 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx,
|
||||||
* The “visible” border.
|
* The “visible” border.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int scale = term->scale;
|
float scale = term->scale;
|
||||||
int bwidth = term->conf->csd.border_width * scale;
|
int bwidth = round(term->conf->csd.border_width * scale);
|
||||||
int vwidth = term->conf->csd.border_width_visible * scale; /* Visible size */
|
int vwidth = round(term->conf->csd.border_width_visible * scale); /* Visible size */
|
||||||
|
|
||||||
xassert(bwidth >= vwidth);
|
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);
|
uint16_t alpha = _color >> 24 | (_color >> 24 << 8);
|
||||||
pixman_color_t color = color_hex_to_pixman_with_alpha(_color, alpha);
|
pixman_color_t color = color_hex_to_pixman_with_alpha(_color, alpha);
|
||||||
|
|
||||||
|
|
||||||
pixman_image_fill_rectangles(
|
pixman_image_fill_rectangles(
|
||||||
PIXMAN_OP_SRC, buf->pix[0], &color, 1,
|
PIXMAN_OP_SRC, buf->pix[0], &color, 1,
|
||||||
&(pixman_rectangle16_t){x, y, w, h});
|
&(pixman_rectangle16_t){x, y, w, h});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue