summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-02-12 16:15:10 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-02-12 16:15:10 (GMT)
commitce09f5af77e6e4b657ced3de19725e633bd170de (patch)
treea0e07cd5f67a7ccb613d9a7e042d1b6ac799674d /macosx
parente6c243fdce70320e6a12d97dea20f3a6b9ae056c (diff)
downloadtk-ce09f5af77e6e4b657ced3de19725e633bd170de.zip
tk-ce09f5af77e6e4b657ced3de19725e633bd170de.tar.gz
tk-ce09f5af77e6e4b657ced3de19725e633bd170de.tar.bz2
Apply same padding fix to Cocoa checkbuttons
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXButton.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index bf55634..5d01ce9 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -406,11 +406,20 @@ TkpComputeButtonGeometry(
}
break;
case TYPE_CHECK_BUTTON:
- /*No padding required here.*/
+ /*Pad checkbutton by 50 if indicatorOn to ensure image does not draw
+ right over radiobutton on left.*/
if (butPtr->image != None) {
- width += 0;
+ if (butPtr->indicatorOn) {
+ width += 50;
+ } else {
+ width += 0;
+ }
} else if (butPtr->bitmap != None) {
- width +=0;
+ if (butPtr->indicatorOn) {
+ width += 50;
+ } else {
+ width += 0;
+ }
} else {
/*If just text, just add width of string.*/
width += txtWidth;