summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-02-12 16:14:57 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-02-12 16:14:57 (GMT)
commit7b2a9f3e0e3a52a26c1fcb28818f8b0a988ce5b3 (patch)
treefe4cef2851c35c0cc9dd19349be3b95c3609acdf /macosx/tkMacOSXButton.c
parentea244cc080877648787abafed6ca504c8d6a6e10 (diff)
downloadtk-7b2a9f3e0e3a52a26c1fcb28818f8b0a988ce5b3.zip
tk-7b2a9f3e0e3a52a26c1fcb28818f8b0a988ce5b3.tar.gz
tk-7b2a9f3e0e3a52a26c1fcb28818f8b0a988ce5b3.tar.bz2
Apply same padding fix to Cocoa checkbuttons
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 09027fe..4dddcf9 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -405,11 +405,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;