summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--unix/tkUnixButton.c12
-rw-r--r--win/tkWinButton.c21
3 files changed, 38 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index e265dbe..e0b90e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2003-04-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * library/bgerror.tcl: make bgerror dialog topmost on Windows to
+ prevent it being covered by other windows.
+
+ * unix/tkUnixButton.c (TkpDisplayButton): Use the normalTextGc when
+ * win/tkWinButton.c (TkpDisplayButton): displaying disabled text
+ that have images, as they get a gray50 stipple as well and the
+ disabledGc is not set up correctly for font drawing. [Bug #477740]
+
+2003-04-18 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkCanvBmap.c: s/CreateBitmap/TkcCreateBitmap as Windows
+ has a CreateBitmap function already.
+
+ * generic/tkCursor.c: s/GetCursor/TkcGetCursor as Windows has a
+ GetCursor func already, which causes compiler warnings.
+
2003-04-02 Mo DeJong <mdejong@users.sourceforge.net>
* win/configure: Regen.
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index c9d8448..24aef95 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.11 2003/02/25 01:39:57 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.1 2003/04/25 20:11:30 hobbs Exp $
*/
#include "tkButton.h"
@@ -266,9 +266,13 @@ TkpDisplayButton(clientData)
XSetClipOrigin(butPtr->display, gc, 0, 0);
}
- Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout,
- x + textXOffset, y + textYOffset, 0, -1);
- Tk_UnderlineTextLayout(butPtr->display, pixmap, gc,
+ /*
+ * Use normalTextGC in this case since we have both text and image,
+ * the whole button will later be stippled 50% grey.
+ */
+ Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC,
+ butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1);
+ Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC,
butPtr->textLayout, x + textXOffset, y + textYOffset,
butPtr->underline);
y += fullHeight/2;
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index 1f050aa..dc8ef12 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.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: tkWinButton.c,v 1.20 2002/09/03 01:05:11 hobbs Exp $
+ * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.1 2003/04/25 20:11:31 hobbs Exp $
*/
#define OEMRESOURCE
@@ -461,10 +461,9 @@ TkpDisplayButton(clientData)
}
haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0);
-
+
if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) {
- int imageXOffset, imageYOffset, fullWidth,
- fullHeight;
+ int imageXOffset, imageYOffset, fullWidth, fullHeight;
imageXOffset = 0;
imageYOffset = 0;
fullWidth = 0;
@@ -542,10 +541,14 @@ TkpDisplayButton(clientData)
y + imageYOffset, 1);
XSetClipOrigin(butPtr->display, gc, 0, 0);
}
-
- Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout,
- x + textXOffset, y + textYOffset, 0, -1);
- Tk_UnderlineTextLayout(butPtr->display, pixmap, gc,
+
+ /*
+ * Use normalTextGC in this case since we have both text and image,
+ * the whole button will later be stippled 50% grey.
+ */
+ Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC,
+ butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1);
+ Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC,
butPtr->textLayout, x + textXOffset, y + textYOffset,
butPtr->underline);
height = fullHeight;
@@ -643,7 +646,7 @@ TkpDisplayButton(clientData)
xSrc += tsdPtr->boxWidth*2;
}
ySrc = (butPtr->type == TYPE_RADIO_BUTTON) ? 0 : tsdPtr->boxHeight;
-
+
/*
* Update the palette in the boxes bitmap to reflect the current
* button colors. Note that this code relies on the layout of the