From 7856046382c2477c67316b40d513f29500430203 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 May 2025 08:56:33 +0530 Subject: [PATCH] Proper odd width x-offset adjustment --- kitty/decorations.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/decorations.c b/kitty/decorations.c index 3b1d37c6f..8a952222e 100644 --- a/kitty/decorations.c +++ b/kitty/decorations.c @@ -1307,7 +1307,8 @@ rectcircle(Canvas *self, Corner which) { static void rounded_corner(Canvas *self, uint level, Corner which) { Rectircle r = rectcircle(self, which); - int x_offset = -((self->width + 1) & 1); // line up with box drawing lines when width is even + uint cell_width_is_odd = (self->width / self->supersample_factor) & 1; + int x_offset = -(cell_width_is_odd & 1); // line up with box drawing lines when cell_width is odd draw_parametrized_curve_with_derivative(self, &r, level, rectircle_x, rectircle_y, rectircle_x_prime, rectircle_y_prime, x_offset, 0.1); }