summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-09 21:29:22 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-09 21:29:22 (GMT)
commit0e661eb452692fff53250ae95abde079888f3a27 (patch)
tree400d34af336e77924815e11b56f6bec3c10d2a56 /generic/tkTextDisp.c
parentf47ea89bb9b84548e135f0a72a033b20f0fe9f2a (diff)
downloadtk-0e661eb452692fff53250ae95abde079888f3a27.zip
tk-0e661eb452692fff53250ae95abde079888f3a27.tar.gz
tk-0e661eb452692fff53250ae95abde079888f3a27.tar.bz2
-selectforeground tag configuration option: implementation
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 1bd5905..e8f8d79 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -798,9 +798,11 @@ GetStyle(
for (i = 0 ; i < numTags; i++) {
Tk_3DBorder border;
+ XColor *fgColor;
tagPtr = tagPtrs[i];
border = tagPtr->border;
+ fgColor = tagPtr->fgColor;
/*
* If this is the selection tag, and inactiveSelBorder is NULL (the
@@ -824,6 +826,10 @@ GetStyle(
border = tagPtr->selBorder;
}
+ if ((tagPtr->selFgColor != None) && (isSelected)) {
+ fgColor = tagPtr->selFgColor;
+ }
+
if ((border != NULL) && (tagPtr->priority > borderPrio)) {
styleValues.border = border;
borderPrio = tagPtr->priority;
@@ -847,8 +853,8 @@ GetStyle(
styleValues.bgStipple = tagPtr->bgStipple;
bgStipplePrio = tagPtr->priority;
}
- if ((tagPtr->fgColor != None) && (tagPtr->priority > fgPrio)) {
- styleValues.fgColor = tagPtr->fgColor;
+ if ((fgColor != None) && (tagPtr->priority > fgPrio)) {
+ styleValues.fgColor = fgColor;
fgPrio = tagPtr->priority;
}
if ((tagPtr->tkfont != None) && (tagPtr->priority > fontPrio)) {