gitk: Replaced "green" with "#00FF00".
PATCH 1/1 gitk: Replaced "green" with "#00FF00".
The definition of "green" has changed in Tk 8.6:
- http://wiki.tcl.tk/21276
- http://www.tcl.tk/cgi-bin/tct/tip/403
gitk looks pretty awkward with Tk 8.6. "green" is simply too dark now because it has changed from "#00FF00" to "#008000".
One could also use "lime" instead of "#00FF00" but that would break compatibility with older versions of Tk.
--- gitk-git/gitk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
gitk-git/gitk +6 -6
@@ -2209,7 +2209,7 @@ proc makewindow {} { set h [expr {[font metrics uifont -linespace] + 2}] set progresscanv .tf.bar.progress canvas $progresscanv -relief sunken -height $h -borderwidth 2 - set progressitem [$progresscanv create rect -1 0 0 $h -fill green] + set progressitem [$progresscanv create rect -1 0 0 $h -fill "#00FF00"] set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow] set rprogitem [$progresscanv create rect -1 0 0 $h -fill red] }
@@ -2342,7 +2342,7 @@ proc makewindow {} { $ctext tag conf dresult -fore [lindex $diffcolors 1] $ctext tag conf m0 -fore red $ctext tag conf m1 -fore blue - $ctext tag conf m2 -fore green + $ctext tag conf m2 -fore "#00FF00" $ctext tag conf m3 -fore purple $ctext tag conf m4 -fore brown $ctext tag conf m5 -fore "#009090"
@@ -3226,7 +3226,7 @@ set rectmask { 0x00, 0x00, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0x00, 0x00}; } -image create bitmap reficon-H -background black -foreground green \ +image create bitmap reficon-H -background black -foreground "#00FF00" \ -data $rectdata -maskdata $rectmask image create bitmap reficon-o -background black -foreground "#ddddff" \ -data $rectdata -maskdata $rectmask
@@ -5909,7 +5909,7 @@ proc drawcmittext {id row col} { if {$id eq $nullid} { set ofill red } elseif {$id eq $nullid2} { - set ofill green + set ofill "#00FF00" } elseif {$id eq $mainheadid} { set ofill yellow } else {
@@ -6377,7 +6377,7 @@ proc drawtags {id x xt y1} { } else { # draw a head or other ref if {[incr nheads -1] >= 0} { - set col green + set col "#00FF00" if {$tag eq $mainhead} { set font mainfontbold }
@@ -11617,7 +11617,7 @@ if {[tk windowingsystem] eq "aqua"} { set extdifftool "meld" } -set colors {green red blue magenta darkgrey brown orange} +set colors {"#00FF00" red blue magenta darkgrey brown orange} if {[tk windowingsystem] eq "win32"} { set uicolor SystemButtonFace set bgcolor SystemWindow
Signature · 1 line
1.8.0.2
Quoted 1 line · Peter Hofmann
Subject: Re: [PATCH] gitk: Replaced "green" with "#00FF00".
That should be
Subject: [PATCH] gitk: replace "green" with "#00FF00"
around here. Instead of reporting what you did in the past tense, you give an order to somebody to do something to make the codebase into more desirable shape, without the final full-stop.
Quoted 4 lines
The definition of "green" has changed in Tk 8.6:
- http://wiki.tcl.tk/21276
- http://www.tcl.tk/cgi-bin/tct/tip/403
Concise reference to the background information is very much appreciated. It would have been even nicer if you wrote one line summary of it, e.g. "This change was to make Tk applications more in line with Web standard colors."
Quoted 2 lines
gitk looks pretty awkward with Tk 8.6. "green" is simply too dark now because it has changed from "#00FF00" to "#008000".
Your observation "awkward" is somewhat subjective and I am hesitant to recommend this change without a better justification. Given the reasoning behind the change Tcl/Tk people made, I wouldn't be surprised if people coming from webapp world view the "green" color rendered by updated Tcl/Tk more natural.
Besides, if we are declaring with this patch that we will stick to X11 colors and will not adopt W3C colors, the patch shouldn't update only "green", but set all the other colors in stone, no? "purple", for example, is also different between X11 and W3C.
Quoted 2 lines
One could also use "lime" instead of "#00FF00" but that would break compatibility with older versions of Tk.
A better solution might be to make these colors customizable.
Quoted 4 lines
Signed-off-by Peter Hofmann <[email protected]>--- gitk-git/gitk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Please make gitk patches against
url = git://ozlabs.org/~paulus/gitk.git
which is my upstream maintained by Paul Mackerras <[email protected]> (cc'ed) and keep him in the loop.
A patch against Paul's tree would have these lines
gitk-git/gitk
Quoted 4 lines
gitk-git/gitk +0
-0
without "/gitk-git".
Thanks.
Quoted 4 lines · Junio C Hamano
Quoted 1 line · Peter Hofmann
Subject: Re: [PATCH] gitk: Replaced "green" with "#00FF00".
Quoted 8 lines
Quoted 2 lines
gitk looks pretty awkward with Tk 8.6. "green" is simply too dark now because it has changed from "#00FF00" to "#008000".
Your observation "awkward" is somewhat subjective and I am hesitant to recommend this change without a better justification. Given the reasoning behind the change Tcl/Tk people made, I wouldn't be surprised if people coming from webapp world view the "green" color rendered by updated Tcl/Tk more natural.
Given that "green" is used as the background color in some places, e.g. for the boxes containing the names of heads, and that the general scheme is dark foreground on light background, I agree that #008000 is too dark in those places.
Quoted 4 lines
Besides, if we are declaring with this patch that we will stick to X11 colors and will not adopt W3C colors, the patch shouldn't update only "green", but set all the other colors in stone, no? "purple", for example, is also different between X11 and W3C.
Purple is only used for octopus merges. I'd like to think of a better way to use color in representing octopus merges if possible.
Quoted 4 lines
Quoted 2 lines
One could also use "lime" instead of "#00FF00" but that would break compatibility with older versions of Tk.
A better solution might be to make these colors customizable.
Indeed. Some people prefer to have all their windows to have light foregrounds on dark backgrounds, so they would also benefit from having more of the colors customizable.
Paul.