git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH]: gitk: different shape for other refs

From
PRPavel Roskin <proski@gnu.org>
Date
Oct 6, 2005, 01:44 UTC
Message-ID
<1128563098.32103.14.camel@dv>
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
Message 1 of 1 in “: gitk: different shape for other refs”
  1. : gitk: different shape for other refsPavel Roskin, Oct 6, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.