summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-10-29 09:36:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-10-29 09:36:41 (GMT)
commit37a0824c4b7a5902e33d131b60c3a5214c6d43b3 (patch)
treef43868effb44972ec838287eafae6a8888d1d489
parent5bbe7b1ec36aa1a2f46eca373202737f96ad313e (diff)
downloadtk-37a0824c4b7a5902e33d131b60c3a5214c6d43b3.zip
tk-37a0824c4b7a5902e33d131b60c3a5214c6d43b3.tar.gz
tk-37a0824c4b7a5902e33d131b60c3a5214c6d43b3.tar.bz2
* library/tkfbox.tcl (IconList_Create,IconList_Add): Added option
munging to allow some control of foreground colours on Unix in the same way that you can influence the background. [Bug 795717]
-rw-r--r--ChangeLog6
-rw-r--r--library/tkfbox.tcl10
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 504f862..ec21dfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-29 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * library/tkfbox.tcl (IconList_Create,IconList_Add): Added option
+ munging to allow some control of foreground colours on Unix in the
+ same way that you can influence the background. [Bug 795717]
+
2003-10-28 Jeff Hobbs <jeffh@ActiveState.com>
* unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index fb4a8e4..6fc0253 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.38 2003/02/21 14:13:26 dkf Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.39 2003/10/29 09:36:42 dkf Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -238,6 +238,12 @@ proc ::tk::IconList_Create {w} {
set data(noScroll) 1
set data(selection) {}
set data(index,anchor) ""
+ set fg [option get $data(canvas) foreground Foreground]
+ if {$fg eq ""} {
+ set data(fill) black
+ } else {
+ set data(fill) $fg
+ }
# Creates the event bindings.
#
@@ -342,7 +348,7 @@ proc ::tk::IconList_Add {w image items} {
set iTag [$data(canvas) create image 0 0 -image $image -anchor nw \
-tags [list icon $data(numItems) item$data(numItems)]]
set tTag [$data(canvas) create text 0 0 -text $text -anchor nw \
- -font $data(font) \
+ -font $data(font) -fill $data(fill) \
-tags [list text $data(numItems) item$data(numItems)]]
set rTag [$data(canvas) create rect 0 0 0 0 -fill "" -outline "" \
-tags [list rect $data(numItems) item$data(numItems)]]