summaryrefslogtreecommitdiffstats
path: root/mac/tkMacButton.c
diff options
context:
space:
mode:
authordas <das>2001-11-23 02:04:08 (GMT)
committerdas <das>2001-11-23 02:04:08 (GMT)
commitaa409cc42da819e8ab1d081e7a1f175b33c1c2cf (patch)
tree0d0864ac4fc0b0ff178f5869f1600d2c584109c8 /mac/tkMacButton.c
parent5efa25f6e1ad2a687cac8c1caab6d8c10f978269 (diff)
downloadtk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.zip
tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.gz
tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.bz2
** upport to 8.4 of mac code changes for 8.3.3 & various new
** changes for 8.4, some already backported to 8.3.4 (patch #435660) see ChangeLog for details
Diffstat (limited to 'mac/tkMacButton.c')
-rw-r--r--mac/tkMacButton.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c
index d308ddd..980a778 100644
--- a/mac/tkMacButton.c
+++ b/mac/tkMacButton.c
@@ -9,12 +9,13 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacButton.c,v 1.14 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkMacButton.c,v 1.15 2001/11/23 02:05:37 das Exp $
*/
#include "tkButton.h"
#include "tkMacInt.h"
#include <Controls.h>
+#include <ControlDefinitions.h>
#include <LowMem.h>
#include <Appearance.h>
@@ -552,10 +553,16 @@ void
TkpComputeButtonGeometry(
TkButton *butPtr) /* Button whose geometry may have changed. */
{
- int width, height, avgWidth, haveImage = 0;
+ int width, height, avgWidth, haveImage = 0, haveText = 0;
int txtWidth, txtHeight;
Tk_FontMetrics fm;
+ width = 0;
+ height = 0;
+ txtWidth = 0;
+ txtHeight = 0;
+ avgWidth = 0;
+
/*
* First figure out the size of the contents of the button.
*/
@@ -569,12 +576,6 @@ TkpComputeButtonGeometry(
haveImage = 1;
}
- width = 0;
- height = 0;
- txtWidth = 0;
- txtHeight = 0;
- avgWidth = 0;
-
if (haveImage == 0 || butPtr->compound != COMPOUND_NONE) {
Tk_FreeTextLayout(butPtr->textLayout);
butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont,