From 9a2c95962d724f704f43721ad5c8f438fc2aef42 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 10 Oct 2003 20:19:51 +0000 Subject: * mac/tkMacButton.c (TkpDisplayButton): * macosx/tkMacOSXButton.c (TkpDisplayButton): * unix/tkUnixButton.c (TkpDisplayButton): correct imageYOffset for buttons with just images. --- ChangeLog | 7 +++++++ mac/tkMacButton.c | 8 ++++---- macosx/tkMacOSXButton.c | 8 ++++---- unix/tkUnixButton.c | 8 ++++---- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86d2597..78b8a0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-10 Jeff Hobbs + + * mac/tkMacButton.c (TkpDisplayButton): + * macosx/tkMacOSXButton.c (TkpDisplayButton): + * unix/tkUnixButton.c (TkpDisplayButton): correct imageYOffset for + buttons with just images. + 2003-10-10 Donal K. Fellows * generic/tkObj.c (TkRegisterObjTypes): Register the type of text diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c index 95fd029..4bc0fdf 100644 --- a/mac/tkMacButton.c +++ b/mac/tkMacButton.c @@ -9,7 +9,7 @@ * 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.18 2003/04/26 02:59:20 hobbs Exp $ + * RCS: @(#) $Id: tkMacButton.c,v 1.19 2003/10/10 20:19:51 hobbs Exp $ */ #include "tkButton.h" @@ -455,15 +455,15 @@ TkpDisplayButton( y += offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, - pixmap, x, y); + pixmap, imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, gc, x, y); diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 9c442bd..80dbb23 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.6 2003/09/30 23:26:09 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.7 2003/10/10 20:19:51 hobbs Exp $ */ #include "tkButton.h" @@ -421,15 +421,15 @@ TkpDisplayButton( y += dpPtr->offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, - pixmap, x, y); + pixmap, imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, dpPtr->gc, x, y); diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index e4f7fe7..9b3c11b 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.15 2003/08/14 12:30:11 dkf Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.16 2003/10/10 20:19:51 hobbs Exp $ */ #include "tkButton.h" @@ -549,15 +549,15 @@ TkpDisplayButton(clientData) y += offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap, - x, y); + imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, gc, x, y); -- cgit v0.12