diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-02-12 16:01:13 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-02-12 16:01:13 (GMT) |
commit | e6c243fdce70320e6a12d97dea20f3a6b9ae056c (patch) | |
tree | 9cd4919129fb91c55c75f348ea922b3becbbd5da | |
parent | 739a187e538263927f4d621b2cf4c59c5753f291 (diff) | |
download | tk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.zip tk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.tar.gz tk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.tar.bz2 |
Limit hard-coded padding in Cocoa buttons to radiobuttons indicatorOn
-rw-r--r-- | macosx/tkMacOSXButton.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index d676641..bf55634 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -386,12 +386,20 @@ TkpComputeButtonGeometry( */ switch (butPtr->type) { case TYPE_RADIO_BUTTON: - /*Pad radiobutton by 50 to ensure image does not draw right over - radiobutton on left.*/ + /*Pad radiobutton by 50 if indicatorOn to ensure image does not draw + right over radiobutton on left.*/ if (butPtr->image != None) { - width += 50; + if (butPtr->indicatorOn) { + width += 50; + } else { + width += 0; + } } else if (butPtr->bitmap != None) { - width +=50; + if (butPtr->indicatorOn) { + width += 50; + } else { + width += 0; + } } else { /*If just text, just add width of string.*/ width += txtWidth; |