diff options
author | a_kovalenko <a_kovalenko> | 2004-06-16 19:53:40 (GMT) |
---|---|---|
committer | a_kovalenko <a_kovalenko> | 2004-06-16 19:53:40 (GMT) |
commit | 55c614a8ed08c8dcb23312b958ed1756d9b9fd17 (patch) | |
tree | a0ece84e8828add7a91d5c7709ece3a750b6dd2a /win | |
parent | 1ba9b61e4f973310a63d5406d99ec5f80934dc60 (diff) | |
download | tk-55c614a8ed08c8dcb23312b958ed1756d9b9fd17.zip tk-55c614a8ed08c8dcb23312b958ed1756d9b9fd17.tar.gz tk-55c614a8ed08c8dcb23312b958ed1756d9b9fd17.tar.bz2 |
win/tkWinButton.c: Add a 3D highlight to disabled *buttons and
labels, the same way as it's now done for disabled menu entries.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinButton.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 5b12e0c..d9b10b5 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.25 2004/02/18 00:40:24 hobbs Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.26 2004/06/16 19:53:40 a_kovalenko Exp $ */ #define OEMRESOURCE @@ -544,6 +544,19 @@ TkpDisplayButton(clientData) imageXOffset, imageYOffset, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } + if ((butPtr->state == STATE_DISABLED) && + (butPtr->disabledFg != NULL)) { + COLORREF oldFgColor = gc->foreground; + gc->foreground = GetSysColor(COLOR_3DHILIGHT); + Tk_DrawTextLayout(butPtr->display, pixmap, gc, + butPtr->textLayout, x + textXOffset + 1, + y + textYOffset + 1, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, + butPtr->textLayout, x + textXOffset + 1, + y + textYOffset + 1, + butPtr->underline); + gc->foreground = oldFgColor; + } Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); @@ -594,6 +607,17 @@ TkpDisplayButton(clientData) x += offset; y += offset; } + if ((butPtr->state == STATE_DISABLED) && + (butPtr->disabledFg != NULL)) { + COLORREF oldFgColor = gc->foreground; + gc->foreground = GetSysColor(COLOR_3DHILIGHT); + Tk_DrawTextLayout(butPtr->display, pixmap, gc, + butPtr->textLayout, + x + 1, y + 1, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, + butPtr->textLayout, x + 1, y + 1, butPtr->underline); + gc->foreground = oldFgColor; + } Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x, y, 0, -1); Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, |