summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-02-12 16:01:13 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-02-12 16:01:13 (GMT)
commite6c243fdce70320e6a12d97dea20f3a6b9ae056c (patch)
tree9cd4919129fb91c55c75f348ea922b3becbbd5da /macosx/tkMacOSXButton.c
parent739a187e538263927f4d621b2cf4c59c5753f291 (diff)
downloadtk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.zip
tk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.tar.gz
tk-e6c243fdce70320e6a12d97dea20f3a6b9ae056c.tar.bz2
Limit hard-coded padding in Cocoa buttons to radiobuttons indicatorOn
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c16
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;