diff options
author | jingham <jingham> | 1999-08-10 05:04:45 (GMT) |
---|---|---|
committer | jingham <jingham> | 1999-08-10 05:04:45 (GMT) |
commit | 4904c2fefb18f2f2cc5e3e70d58e1750f52fa659 (patch) | |
tree | 7316e518597bb3d84ce7a7a7cabcf5b05832add8 /generic/tkTextDisp.c | |
parent | 1cdd5fb850d1be603e0994761bd0271233c964c4 (diff) | |
download | tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.zip tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.tar.gz tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.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.
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 486f167..90b1bd2 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextDisp.c,v 1.6 1999/04/21 21:53:28 rjohnson Exp $ + * RCS: @(#) $Id: tkTextDisp.c,v 1.7 1999/08/10 05:07:36 jingham Exp $ */ #include "tkPort.h" @@ -2241,17 +2241,19 @@ DisplayText(clientData) Tk_Height(textPtr->tkwin) - 2*textPtr->highlightWidth, textPtr->borderWidth, textPtr->relief); if (textPtr->highlightWidth != 0) { - GC gc; + GC fgGC, bgGC; + bgGC = Tk_GCForColor(textPtr->highlightBgColorPtr, + Tk_WindowId(textPtr->tkwin)); if (textPtr->flags & GOT_FOCUS) { - gc = Tk_GCForColor(textPtr->highlightColorPtr, + fgGC = Tk_GCForColor(textPtr->highlightColorPtr, Tk_WindowId(textPtr->tkwin)); + TkpDrawHighlightBorder(textPtr->tkwin, fgGC, bgGC, + textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin)); } else { - gc = Tk_GCForColor(textPtr->highlightBgColorPtr, - Tk_WindowId(textPtr->tkwin)); + TkpDrawHighlightBorder(textPtr->tkwin, bgGC, bgGC, + textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin)); } - Tk_DrawFocusHighlight(textPtr->tkwin, gc, textPtr->highlightWidth, - Tk_WindowId(textPtr->tkwin)); } borders = textPtr->borderWidth + textPtr->highlightWidth; if (textPtr->padY > 0) { |