From 2317d81c7060a3b2826b76b064502006ddb84f98 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 17 Oct 2021 19:30:59 +0100 Subject: [PATCH] Fix inset rectangle corners when sides aren't drawn (bug#51251) * src/nsterm.m (ns_draw_relief): Make the inner rectangle line up with the outer rectangle's edges where the edges aren't drawn. --- src/nsterm.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index c6f80f8035..aa29c13eb2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3512,7 +3512,12 @@ larger if there are taller display elements (e.g., characters } /* Calculate the inner rectangle. */ - inner = NSInsetRect (outer, hthickness, vthickness); + inner = NSMakeRect (NSMinX (outer) + (left_p ? hthickness : 0), + NSMinY (outer) + (top_p ? vthickness : 0), + NSWidth (outer) - (left_p ? hthickness : 0) + - (right_p ? hthickness : 0), + NSHeight (outer) - (top_p ? vthickness : 0) + - (bottom_p ? vthickness : 0)); [(raised_p ? lightCol : darkCol) set]; -- 2.33.0