git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gitk: improve dark background, s/black/$fgcolor/
@ 2010-07-22 23:10 David Fries
  0 siblings, 0 replies; 2+ messages in thread
From: David Fries @ 2010-07-22 23:10 UTC (permalink / raw)
  To: git

Replace most uses of black with $fgcolor as items such as a black
outline on the tag or tag lines with a black background doesn't show
up.  Use $fgcolor instead to make it contrast with the background.
---
 gitk-git/gitk |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1b0e09a..8ca7182 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -6270,7 +6270,7 @@ proc drawtags {id x xt y1} {
 	set xt [expr {$xt + $delta + $wid + $lthickness + $linespc}]
     }
     set t [$canv create line $x $y1 [lindex $xvals end] $y1 \
-	       -width $lthickness -fill black -tags tag.$id]
+	       -width $lthickness -fill $fgcolor -tags tag.$id]
     $canv lower $t
     foreach tag $marks x $xvals wid $wvals {
 	set xl [expr {$x + $delta}]
@@ -6280,7 +6280,7 @@ proc drawtags {id x xt y1} {
 	    # draw a tag
 	    set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \
 		       $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \
-		       -width 1 -outline black -fill yellow -tags tag.$id]
+		       -width 1 -outline $fgcolor -fill yellow -tags tag.$id]
 	    $canv bind $t <1> [list showtag $tag 1]
 	    set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}]
 	} else {
@@ -6295,7 +6295,7 @@ proc drawtags {id x xt y1} {
 	    }
 	    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
+		-width 1 -outline $fgcolor -fill $col -tags tag.$id
 	    if {[regexp {^(remotes/.*/|remotes/)} $tag match remoteprefix]} {
 	        set rwid [font measure mainfont $remoteprefix]
 		set xi [expr {$x + 1}]
@@ -8215,6 +8215,7 @@ proc linehover {} {
     global hoverx hovery hoverid hovertimer
     global canv linespc lthickness
     global commitinfo
+    global fgcolor
 
     set text [lindex $commitinfo($hoverid) 0]
     set ymax [lindex [$canv cget -scrollregion] 3]
@@ -8227,7 +8228,7 @@ proc linehover {} {
     set x1 [expr {$x + [font measure mainfont $text] + 2 * $lthickness}]
     set y1 [expr {$y + $linespc + 2 * $lthickness}]
     set t [$canv create rectangle $x0 $y0 $x1 $y1 \
-	       -fill \#ffff80 -outline black -width 1 -tags hover]
+	       -fill \#ffff80 -outline $fgcolor -width 1 -tags hover]
     $canv raise $t
     set t [$canv create text $x $y -anchor nw -text $text -tags hover \
 	       -font mainfont]
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 1/3] gitk: improve dark background, s/black/$fgcolor/
  2010-11-11  4:59 [PATCH 0/3] gitk: improve dark background David Fries
@ 2010-11-11  5:19 ` David Fries
  0 siblings, 0 replies; 2+ messages in thread
From: David Fries @ 2010-11-11  5:19 UTC (permalink / raw)
  To: git; +Cc: David Fries

Replace most uses of black with $fgcolor as items such as a black
outline on the tag or tag lines with a black background doesn't show
up.  Use $fgcolor instead to make it contrast with the background.

Signed-off-by: David Fries <David@Fries.net>
---
 gitk-git/gitk |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1b0e09a..af43353 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -6270,7 +6270,7 @@ proc drawtags {id x xt y1} {
 	set xt [expr {$xt + $delta + $wid + $lthickness + $linespc}]
     }
     set t [$canv create line $x $y1 [lindex $xvals end] $y1 \
-	       -width $lthickness -fill black -tags tag.$id]
+	       -width $lthickness -fill $fgcolor -tags [list tag.$id line]]
     $canv lower $t
     foreach tag $marks x $xvals wid $wvals {
 	set xl [expr {$x + $delta}]
@@ -6280,7 +6280,7 @@ proc drawtags {id x xt y1} {
 	    # draw a tag
 	    set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \
 		       $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \
-		       -width 1 -outline black -fill yellow -tags tag.$id]
+		       -width 1 -outline $fgcolor -fill yellow -tags tag.$id]
 	    $canv bind $t <1> [list showtag $tag 1]
 	    set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}]
 	} else {
@@ -6295,7 +6295,7 @@ proc drawtags {id x xt y1} {
 	    }
 	    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
+		-width 1 -outline $fgcolor -fill $col -tags tag.$id
 	    if {[regexp {^(remotes/.*/|remotes/)} $tag match remoteprefix]} {
 	        set rwid [font measure mainfont $remoteprefix]
 		set xi [expr {$x + 1}]
@@ -8215,6 +8215,7 @@ proc linehover {} {
     global hoverx hovery hoverid hovertimer
     global canv linespc lthickness
     global commitinfo
+    global fgcolor
 
     set text [lindex $commitinfo($hoverid) 0]
     set ymax [lindex [$canv cget -scrollregion] 3]
@@ -8227,7 +8228,7 @@ proc linehover {} {
     set x1 [expr {$x + [font measure mainfont $text] + 2 * $lthickness}]
     set y1 [expr {$y + $linespc + 2 * $lthickness}]
     set t [$canv create rectangle $x0 $y0 $x1 $y1 \
-	       -fill \#ffff80 -outline black -width 1 -tags hover]
+	       -fill \#ffff80 -outline $fgcolor -width 1 -tags hover]
     $canv raise $t
     set t [$canv create text $x $y -anchor nw -text $text -tags hover \
 	       -font mainfont]
@@ -10886,6 +10887,7 @@ proc setfg {c} {
     allcanvs itemconf text -fill $c
     $canv itemconf circle -outline $c
     $canv itemconf markid -outline $c
+    $canv itemconf line -fill $c
 }
 
 proc prefscan {} {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-11  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 23:10 [PATCH 1/3] gitk: improve dark background, s/black/$fgcolor/ David Fries
  -- strict thread matches above, loose matches on Subject: below --
2010-11-11  4:59 [PATCH 0/3] gitk: improve dark background David Fries
2010-11-11  5:19 ` [PATCH 1/3] gitk: improve dark background, s/black/$fgcolor/ David Fries

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).