diff options
author | Kevin Walzer <kw@codebykevin.com> | 2016-07-06 03:00:40 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2016-07-06 03:00:40 (GMT) |
commit | a9d93b98d14df99abf5addb82fb040b6cde5da88 (patch) | |
tree | 7091afb4c46f00d75d600337c1676711722c6bfa /macosx/tkMacOSXButton.c | |
parent | fd28ca4d9a6ce6fdf671416564893bf55f9c5acc (diff) | |
download | tk-a9d93b98d14df99abf5addb82fb040b6cde5da88.zip tk-a9d93b98d14df99abf5addb82fb040b6cde5da88.tar.gz tk-a9d93b98d14df99abf5addb82fb040b6cde5da88.tar.bz2 |
Fix for excessive label padding in Tk/Mac; thanks to Brad Lanam for bug report
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 3 |
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); |