summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2016-07-06 03:03:56 (GMT)
committerKevin Walzer <kw@codebykevin.com>2016-07-06 03:03:56 (GMT)
commit059d7ba3e1fc7c1e637691e2b9b6766103009590 (patch)
tree0d8583e0d7b0382527ad0eb2f0137f926e713064
parent9cac9f6923f6fe6018f4fb6b898ccf1d630a04b0 (diff)
downloadtk-059d7ba3e1fc7c1e637691e2b9b6766103009590.zip
tk-059d7ba3e1fc7c1e637691e2b9b6766103009590.tar.gz
tk-059d7ba3e1fc7c1e637691e2b9b6766103009590.tar.bz2
Fix for excessive label padding in Tk/Mac; thanks to Brad Lanam for bug report
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 2 insertions, 1 deletions
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);