diff options
author | jingham <jingham@noemail.net> | 1999-08-10 05:04:44 (GMT) |
---|---|---|
committer | jingham <jingham@noemail.net> | 1999-08-10 05:04:44 (GMT) |
commit | c582bf35bf20084065646debe5530181755dd44e (patch) | |
tree | 7316e518597bb3d84ce7a7a7cabcf5b05832add8 /generic/tkFrame.c | |
parent | 961a6ba6f98f8f6bbb1f1654697976bd4771cc6d (diff) | |
download | tk-c582bf35bf20084065646debe5530181755dd44e.zip tk-c582bf35bf20084065646debe5530181755dd44e.tar.gz tk-c582bf35bf20084065646debe5530181755dd44e.tar.bz2 |
New Function: TkpDrawHighlightBorder. Use this in place of Tk_DrawFocusHighlight. The latter did not work on the Mac, since you need to know both foreground & background color when you draw the active focus ring.
FossilOrigin-Name: 9bb078186f93162afcdcd453066e44b705aa8186
Diffstat (limited to 'generic/tkFrame.c')
-rw-r--r-- | generic/tkFrame.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 9bdee9a..9284deb 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFrame.c,v 1.3 1999/04/16 01:51:14 stanton Exp $ + * RCS: @(#) $Id: tkFrame.c,v 1.4 1999/08/10 05:06:01 jingham Exp $ */ #include "default.h" @@ -694,7 +694,6 @@ DisplayFrame(clientData) { register Frame *framePtr = (Frame *) clientData; register Tk_Window tkwin = framePtr->tkwin; - GC gc; framePtr->flags &= ~REDRAW_PENDING; if ((framePtr->tkwin == NULL) || !Tk_IsMapped(tkwin) @@ -711,15 +710,19 @@ DisplayFrame(clientData) framePtr->borderWidth, framePtr->relief); } if (framePtr->highlightWidth != 0) { + GC fgGC, bgGC; + + bgGC = Tk_GCForColor(framePtr->highlightBgColorPtr, + Tk_WindowId(tkwin)); if (framePtr->flags & GOT_FOCUS) { - gc = Tk_GCForColor(framePtr->highlightColorPtr, + fgGC = Tk_GCForColor(framePtr->highlightColorPtr, + Tk_WindowId(tkwin)); + TkpDrawHighlightBorder(tkwin, fgGC, bgGC, framePtr->highlightWidth, Tk_WindowId(tkwin)); } else { - gc = Tk_GCForColor(framePtr->highlightBgColorPtr, + TkpDrawHighlightBorder(tkwin, bgGC, bgGC, framePtr->highlightWidth, Tk_WindowId(tkwin)); } - Tk_DrawFocusHighlight(tkwin, gc, framePtr->highlightWidth, - Tk_WindowId(tkwin)); } } |