diff options
author | kevin_walzer <kevin_walzer@noemail.net> | 2016-07-06 03:03:56 (GMT) |
---|---|---|
committer | kevin_walzer <kevin_walzer@noemail.net> | 2016-07-06 03:03:56 (GMT) |
commit | b86e37bc300ac28e48c21ad14d6b2b513f65d108 (patch) | |
tree | 0d8583e0d7b0382527ad0eb2f0137f926e713064 | |
parent | ffd3bc4e2594b4931f097568a30cc0dd3ee7bdb7 (diff) | |
download | tk-b86e37bc300ac28e48c21ad14d6b2b513f65d108.zip tk-b86e37bc300ac28e48c21ad14d6b2b513f65d108.tar.gz tk-b86e37bc300ac28e48c21ad14d6b2b513f65d108.tar.bz2 |
Fix for excessive label padding in Tk/Mac; thanks to Brad Lanam for bug report
FossilOrigin-Name: 06e5b1f89c71c1617501a74d384a960fb2a99f61
-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); |