diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-02-12 16:14:57 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-02-12 16:14:57 (GMT) |
commit | b46c0b2c3038a962d11a414fe65dc3f4c9529389 (patch) | |
tree | 5ee82d58810fb780dec26ce0ba0cccd5a65d0364 | |
parent | 6add3bbaa483188be137880b35890c8d446da0d0 (diff) | |
download | tk-b46c0b2c3038a962d11a414fe65dc3f4c9529389.zip tk-b46c0b2c3038a962d11a414fe65dc3f4c9529389.tar.gz tk-b46c0b2c3038a962d11a414fe65dc3f4c9529389.tar.bz2 |
Apply same padding fix to Cocoa checkbuttons
-rw-r--r-- | macosx/tkMacOSXButton.c | 15 |
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; |