# HG changeset patch # User Robert Bauck Hamar # Date 2009-02-09 18:00:48 # Node ID 8bfe47e726feeab210a3cf622df36e429e88fc75 # Parent b44dbb95f07f40a4594a00604046d2993edf4be4 hgk: added setting of foreground colour Added the fgcolor setting read by hgk to change the text colour in the diff output and the file list. The colours for diff highlighting remains unchanged. diff --git a/contrib/hgk b/contrib/hgk --- a/contrib/hgk +++ b/contrib/hgk @@ -439,7 +439,7 @@ proc makewindow {} { global entries sha1entry sha1string sha1but global maincursor textcursor curtextcursor global rowctxmenu gaudydiff mergemax - global hgvdiff bgcolor + global hgvdiff bgcolor fgcolor menu .bar .bar add cascade -label "File" -menu .bar.file @@ -547,7 +547,7 @@ proc makewindow {} { .ctop add .ctop.cdet frame .ctop.cdet.left set ctext .ctop.cdet.left.ctext - text $ctext -bg $bgcolor -state disabled -font $textfont \ + text $ctext -fg $fgcolor -bg $bgcolor -state disabled -font $textfont \ -width $geometry(ctextw) -height $geometry(ctexth) \ -yscrollcommand ".ctop.cdet.left.sb set" \ -xscrollcommand ".ctop.cdet.left.hb set" -wrap none @@ -581,7 +581,8 @@ proc makewindow {} { frame .ctop.cdet.right set cflist .ctop.cdet.right.cfiles - listbox $cflist -bg $bgcolor -selectmode extended -width $geometry(cflistw) \ + listbox $cflist -fg $fgcolor -bg $bgcolor \ + -selectmode extended -width $geometry(cflistw) \ -yscrollcommand ".ctop.cdet.right.sb set" scrollbar .ctop.cdet.right.sb -command "$cflist yview" pack .ctop.cdet.right.sb -side right -fill y @@ -679,7 +680,7 @@ proc click {w} { proc savestuff {w} { global canv canv2 canv3 ctext cflist mainfont textfont global stuffsaved findmergefiles gaudydiff maxgraphpct - global maxwidth authorcolors curidfont bgcolor + global maxwidth authorcolors curidfont bgcolor fgcolor if {$stuffsaved} return if {![winfo viewable .]} return @@ -722,6 +723,9 @@ proc savestuff {w} { puts $f "#" puts $f "set authorcolors {$authorcolors}" puts $f "set bgcolor $bgcolor" + puts $f "#" + puts $f "# The text color used in the diff and file list view" + puts $f "set fgcolor $fgcolor" close $f file rename -force "~/.hgk-new" "~/.hgk" } @@ -3894,6 +3898,10 @@ set authorcolors { } set bgcolor white +# This color should probably be some system color (provided by tk), +# but as the bgcolor has always been set to white, I choose to ignore +set fgcolor black + catch {source ~/.hgk} if {$curidfont == ""} { # initialize late based on current mainfont