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

blue on a black background might as well look like dark blue on black
and is very difficult to read.  The "Diff: hunk header" keeps the
colors more consistent and both default to blue.
---
 gitk-git/gitk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 8ca7182..a851762 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -6673,7 +6673,7 @@ proc appendwithlinks {text tags} {
 }
 
 proc setlink {id lk} {
-    global curview ctext pendinglinks
+    global curview ctext pendinglinks diffcolors
 
     set known 0
     if {[string length $id] < 40} {
@@ -6687,7 +6687,7 @@ proc setlink {id lk} {
 	set known [commitinview $id $curview]
     }
     if {$known} {
-	$ctext tag conf $lk -foreground blue -underline 1
+	$ctext tag conf $lk -foreground [lindex $diffcolors 2] -underline 1
 	$ctext tag bind $lk <1> [list selbyid $id]
 	$ctext tag bind $lk <Enter> {linkcursor %W 1}
 	$ctext tag bind $lk <Leave> {linkcursor %W -1}
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH 0/3] gitk: improve dark background
@ 2010-11-11  4:59 David Fries
  2010-11-11  5:19 ` [PATCH 2/3] gitk: improve dark background, use diffcolor 2 for link David Fries
  0 siblings, 1 reply; 2+ messages in thread
From: David Fries @ 2010-11-11  4:59 UTC (permalink / raw)
  To: git

The gitk preferences allow for the user to select different colors.
The setui is even set to dynamically detect how light or dark the
background is and set the selection color to be the opposite, but
there are a few other color selections that don't currently work with
a dark background such as the black outlines.  This patch improves the
color selection.  In some cases it just needs to use the current
forground color, other places it is more complicated.

The gitk_colors branch can be pulled from,
git://gitorious.org/~dfries/git/dfriess-git-mainline.git

my relevant .gitk config file settings,

set mainfont {Helvetica 8}
set textfont {Courier 8}
set uifont {Helvetica 9 bold}
set uicolor grey85
set bgcolor black
set fgcolor white
set colors {green red blue magenta darkgrey brown orange}
set diffcolors {red green cyan}
set markbgcolor #404060
set selectbgcolor gray50

^ permalink raw reply	[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:12 [PATCH 2/3] gitk: improve dark background, use diffcolor 2 for link 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 2/3] gitk: improve dark background, use diffcolor 2 for link 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).