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.
This commit is contained in:
Alan Third 2021-10-17 19:30:59 +01:00
parent 5c1a575ef4
commit 91d71b38a3

View file

@ -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];