summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-09 21:36:19 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-09 21:36:19 (GMT)
commitda061a037670e4bc29f960a349403aac50cd915c (patch)
tree95981a882f67c7265356d2d0b262cb690931eff6 /generic/tkTextDisp.c
parentfe236b4cfe544d14e84df23e27d07f7efba752d5 (diff)
downloadtk-da061a037670e4bc29f960a349403aac50cd915c.zip
tk-da061a037670e4bc29f960a349403aac50cd915c.tar.gz
tk-da061a037670e4bc29f960a349403aac50cd915c.tar.bz2
-selectfgstipple 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 0ccd3c2..d0c1483 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -800,11 +800,13 @@ GetStyle(
Tk_3DBorder border;
Pixmap bgStipple;
XColor *fgColor;
+ Pixmap fgStipple;
tagPtr = tagPtrs[i];
border = tagPtr->border;
bgStipple = tagPtr->bgStipple;
fgColor = tagPtr->fgColor;
+ fgStipple = tagPtr->fgStipple;
/*
* If this is the selection tag, and inactiveSelBorder is NULL (the
@@ -836,6 +838,10 @@ GetStyle(
fgColor = tagPtr->selFgColor;
}
+ if ((tagPtr->selFgStipple != None) && (isSelected)) {
+ bgStipple = tagPtr->selFgStipple;
+ }
+
if ((border != NULL) && (tagPtr->priority > borderPrio)) {
styleValues.border = border;
borderPrio = tagPtr->priority;
@@ -867,9 +873,9 @@ GetStyle(
styleValues.tkfont = tagPtr->tkfont;
fontPrio = tagPtr->priority;
}
- if ((tagPtr->fgStipple != None)
+ if ((fgStipple != None)
&& (tagPtr->priority > fgStipplePrio)) {
- styleValues.fgStipple = tagPtr->fgStipple;
+ styleValues.fgStipple = fgStipple;
fgStipplePrio = tagPtr->priority;
}
if ((tagPtr->justifyString != NULL)