git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: gitk: different shape for other refs
@ 2005-10-06  1:44 Pavel Roskin
  0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2005-10-06  1:44 UTC (permalink / raw)
  To: Paul Mackerras, git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-06  1:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-06  1:44 [PATCH]: gitk: different shape for other refs Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).