From: Alan Third Date: Sun, 17 Oct 2021 18:30:59 +0000 (+0100) Subject: Fix inset rectangle corners when sides aren't drawn (bug#51251) X-Git-Tag: emacs-28.0.90~243 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91d71b38a333c9b3dc411547c1ad61f0ee63d4e6;p=emacs.git 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. --- diff --git a/src/nsterm.m b/src/nsterm.m index c6f80f80350..aa29c13eb22 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3512,7 +3512,12 @@ ns_draw_relief (NSRect outer, int hthickness, int vthickness, char raised_p, } /* 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];