Subject: Fix for excessive label padding in Tk/Mac; thanks to Brad Lanam for bug report

From: Kevin Walzer <[email-masked]>
Date: Wed, 6 Jul 2016 03:00:40 +0000

---
 macosx/tkMacOSXButton.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index ebbcf09..f4fbc48 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -318,7 +318,8 @@ TkpComputeButtonGeometry(
 		Tcl_GetString(butPtr->textPtr), -1, butPtr->wrapLength,
 		butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight);
 
-	txtWidth = butPtr->textWidth + DEF_INSET_LEFT + DEF_INSET_RIGHT;
+	/*Remove extraneous padding around label widgets.*/
+	txtWidth = butPtr->textWidth;
 	txtHeight = butPtr->textHeight + DEF_INSET_BOTTOM + DEF_INSET_TOP;
 	charWidth = Tk_TextWidth(butPtr->tkfont, "0", 1);
 	Tk_GetFontMetrics(butPtr->tkfont, &fm);
-- 
cgit v0.12