summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley@noemail.net>2004-11-09 12:46:08 (GMT)
committervincentdarley <vincentdarley@noemail.net>2004-11-09 12:46:08 (GMT)
commit185f5e86a40785b99c454f5d3a3cb7ec31c0b0a6 (patch)
treec929e40207f8d3ff0223c110e2d55935f7eb4bdd /macosx
parent32fe4056059a9e69014433c4643ace7d4f886bd2 (diff)
downloadtk-185f5e86a40785b99c454f5d3a3cb7ec31c0b0a6.zip
tk-185f5e86a40785b99c454f5d3a3cb7ec31c0b0a6.tar.gz
tk-185f5e86a40785b99c454f5d3a3cb7ec31c0b0a6.tar.bz2
fix to MacOSX compound button layout
FossilOrigin-Name: 468121ce4096dce351ad1bdbdaceac7c1252e68b
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXButton.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 320ffe6..0bdb767 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXButton.c,v 1.9 2004/02/18 00:40:24 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.10 2004/11/09 12:46:10 vincentdarley Exp $
*/
#include "tkButton.h"
@@ -976,9 +976,15 @@ TkMacOSXDrawControl(
Tk_Font font;
int len;
- len = TkFontGetFirstTextLayout(butPtr->textLayout,
- &font, controlTitle);
- controlTitle[len] = 0;
+ if ((mbPtr->info.image == NULL) && (mbPtr->info.bitmap == None)
+ || (mbPtr->info.compound != COMPOUND_NONE)) {
+ len = TkFontGetFirstTextLayout(butPtr->textLayout,
+ &font, controlTitle);
+ controlTitle[len] = 0;
+ } else {
+ len = 0;
+ controlTitle[0] = 0;
+ }
if (bcmp(mbPtr->controlTitle, controlTitle, len+1)) {
CFStringRef cf;
cf = CFStringCreateWithCString(NULL,