summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-09 21:23:23 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-09 21:23:23 (GMT)
commitb258e6b408ef99ed31fdde484f21548851eca156 (patch)
tree11d3f289c1d49dc3eb2042f5243f7eb241923eaa /generic/tkTextDisp.c
parent8f151700b10bf8811876305e284738707d4ad237 (diff)
downloadtk-b258e6b408ef99ed31fdde484f21548851eca156.zip
tk-b258e6b408ef99ed31fdde484f21548851eca156.tar.gz
tk-b258e6b408ef99ed31fdde484f21548851eca156.tar.bz2
-selectbackground tag configuration option: implementation
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 7969091..1bd5905 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -748,6 +748,7 @@ GetStyle(
TextStyle *stylePtr;
Tcl_HashEntry *hPtr;
int numTags, isNew, i;
+ int isSelected;
XGCValues gcValues;
unsigned long mask;
/*
@@ -786,6 +787,14 @@ GetStyle(
styleValues.tabStyle = textPtr->tabStyle;
styleValues.wrapMode = textPtr->wrapMode;
styleValues.elide = 0;
+ isSelected = 0;
+
+ for (i = 0 ; i < numTags; i++) {
+ if (textPtr->selTagPtr == tagPtrs[i]) {
+ isSelected = 1;
+ break;
+ }
+ }
for (i = 0 ; i < numTags; i++) {
Tk_3DBorder border;
@@ -811,6 +820,10 @@ GetStyle(
border = textPtr->inactiveSelBorder;
}
+ if ((tagPtr->selBorder != NULL) && (isSelected)) {
+ border = tagPtr->selBorder;
+ }
+
if ((border != NULL) && (tagPtr->priority > borderPrio)) {
styleValues.border = border;
borderPrio = tagPtr->priority;