# [PATCH]: gitk: different shape for other refs

1 messages from 2005-10-06 to 2005-10-06. Participants: Pavel Roskin.
Thread: https://gitlist.dev/t/2030

## Pavel Roskin, 2005-10-06 01:44

Subject: [PATCH]: gitk: different shape for other refs
Message-ID: <1128563098.32103.14.camel@dv>
URL: https://gitlist.dev/e/1128563098.32103.14.camel%40dv

```
Hello!

It's not unfriendly to distinguish heads and other refs only by color.
Not everybody can distinguish green and blue.  This patch changes the
shape used for other refs to "tabs" with five corners.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/gitk b/gitk
--- a/gitk
+++ b/gitk
@@ -939,15 +939,17 @@ proc drawtags {id x xt y1} {
 	    $canv bind $t <1> [list showtag $tag 1]
 	    set rowtextx($idline($id)) [expr {$xr + $linespc}]
 	} else {
-	    # draw a head or other ref
 	    if {[incr nheads -1] >= 0} {
-		set col green
+		# draw a head
+		set xl [expr $xl - $delta/2]
+		$canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
+		    -width 1 -outline black -fill green -tags tag.$id
 	    } else {
-		set col "#ddddff"
+		# draw other ref
+		$canv create polygon $x [expr $yt + $delta] $xl $yt \
+		    $xr $yt $xr $yb $x $yb \
+		    -width 1 -outline black -fill "#ddddff" -tags tag.$id
 	    }
-	    set xl [expr $xl - $delta/2]
-	    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
-		-width 1 -outline black -fill $col -tags tag.$id
 	}
 	set t [$canv create text $xl $y1 -anchor w -text $tag \
 		   -font $mainfont -tags tag.$id]


-- 
Regards,
Pavel Roskin

```
