summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2017-11-22 03:04:43 (GMT)
committerKevin Walzer <kw@codebykevin.com>2017-11-22 03:04:43 (GMT)
commit2e89b1cbfa3c417a84208ac3449bc403b9bd4e01 (patch)
tree8bb13c5e2d2b9789836f12e24693dc2432d3895f /macosx/tkMacOSXButton.c
parente9241f5812514186be4b1348c32086afc2fc0011 (diff)
downloadtk-2e89b1cbfa3c417a84208ac3449bc403b9bd4e01.zip
tk-2e89b1cbfa3c417a84208ac3449bc403b9bd4e01.tar.gz
tk-2e89b1cbfa3c417a84208ac3449bc403b9bd4e01.tar.bz2
Improve metrics for text-only buttons on macOS
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index f4fbc48..0ed52db 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -364,7 +364,8 @@ TkpComputeButtonGeometry(
height = butPtr->height > 0 ? butPtr->height : height;
} else { /* Text only */
- width = txtWidth + butPtr->indicatorSpace;
+ /*Add four pixels of padding to width for text-only buttons to improve appearance.*/
+ width = txtWidth + butPtr->indicatorSpace + 4;
height = txtHeight;
if (butPtr->width > 0) {
width = butPtr->width * charWidth;