summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorjingham <jingham>1999-08-10 05:04:45 (GMT)
committerjingham <jingham>1999-08-10 05:04:45 (GMT)
commit4904c2fefb18f2f2cc5e3e70d58e1750f52fa659 (patch)
tree7316e518597bb3d84ce7a7a7cabcf5b05832add8 /generic/tkCanvas.c
parent1cdd5fb850d1be603e0994761bd0271233c964c4 (diff)
downloadtk-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/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 40f3555..a184769 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.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: tkCanvas.c,v 1.6 1999/04/21 21:53:24 rjohnson Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.7 1999/08/10 05:05:20 jingham Exp $
*/
#include "default.h"
@@ -1839,17 +1839,20 @@ DisplayCanvas(clientData)
canvasPtr->borderWidth, canvasPtr->relief);
}
if (canvasPtr->highlightWidth != 0) {
- GC gc;
+ GC fgGC, bgGC;
+
+ bgGC = Tk_GCForColor(canvasPtr->highlightColorPtr,
+ Tk_WindowId(tkwin));
if (canvasPtr->textInfo.gotFocus) {
- gc = Tk_GCForColor(canvasPtr->highlightColorPtr,
+ fgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr,
Tk_WindowId(tkwin));
+ TkpDrawHighlightBorder(tkwin, fgGC, bgGC, canvasPtr->highlightWidth,
+ Tk_WindowId(tkwin));
} else {
- gc = Tk_GCForColor(canvasPtr->highlightBgColorPtr,
- Tk_WindowId(tkwin));
+ TkpDrawHighlightBorder(tkwin, bgGC, bgGC, canvasPtr->highlightWidth,
+ Tk_WindowId(tkwin));
}
- Tk_DrawFocusHighlight(tkwin, gc, canvasPtr->highlightWidth,
- Tk_WindowId(tkwin));
}
}