Subject: Re: gitk "hyperlinks" (was Re: Display of merges in gitk)

From: [email-masked]
Date: Sat, 6 Aug 2005 12:07:39 -0500

On Sat, Aug 06, 2005 at 09:20:16AM -0700, Linus Torvalds wrote:
> Looks good also. I assume the mouse can't change when it hovers? 

In gitk?  This is be possible.  My patch[1] does it.  The way it's done stinks a
little bit, though.  <Enter> and <Leave> are bound on a tag common to all the
"hyperlinks", and change the -cursor of the whole widget---either to hand2 or
the empty string.

+    $ctext tag bind Commit <Enter> { %W configure -cursor hand2 }
+    $ctext tag bind Commit <Leave> { %W configure -cursor {} }

My patch also underlines links, as requested in a different message in this thread.

+    $ctext tag configure Commit -underline yes -foreground blue

Jeff
[1] http://www.gelato.unsw.edu.au/archives/git/0508/7253.html