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

[PATCH 12/13] gitk: add a configuration setting `remoterefbgcolor`

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Dec 19, 2016, 16:45 UTC
Message-ID
<543b8463c22b19aade4c5dbcc72f4fc8663d372a.1482164633.git.mhagger@alum.mit.edu>
In-Reply-To
<cover.1482164633.git.mhagger@alum.mit.edu>

Remote-tracking references are very different than local branches, so it would be nice to make it possible to distinguish then visually. So allow the remote reference background color to be configured separately from the branch reference background color by introducing a new constant, `remoterefbgcolor`. For the moment, leave it set to the old default `headbgcolor`.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 gitk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gitk b/gitk
index 0bd4aa5..cb5c715 100755
--- a/gitk
+++ b/gitk
@@ -6574,7 +6574,7 @@ proc drawtags {id x xt y1} {
     global linespc lthickness
     global canv rowtextx curview fgcolor bgcolor ctxbut
     global headbgcolor headfgcolor headoutlinecolor
-    global remotebgcolor otherrefbgcolor
+    global remotebgcolor remoterefbgcolor otherrefbgcolor
     global tagbgcolor tagfgcolor tagoutlinecolor
     global reflinecolor
 
@@ -6669,8 +6669,10 @@ proc drawtags {id x xt y1} {
 	    if {$type eq "mainhead"} {
 		set col $headbgcolor
 		set font mainfontbold
-	    } elseif {$type eq "head" || $type eq "remote"} {
+	    } elseif {$type eq "head"} {
 		set col $headbgcolor
+	    } elseif {$type eq "remote"} {
+		set col $remoterefbgcolor
 	    } else {
 		set col $otherrefbgcolor
 	    }
@@ -12362,6 +12364,7 @@ set headbgcolor "#00ff00"
 set headfgcolor black
 set headoutlinecolor black
 set remotebgcolor #ffddaa
+set remoterefbgcolor #00ff00
 set otherrefbgcolor #ddddff
 set tagbgcolor yellow
 set tagfgcolor black
@@ -12420,7 +12423,7 @@ set config_variables {
     bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors
     markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor
     extdifftool perfile_attrs headbgcolor headfgcolor headoutlinecolor
-    remotebgcolor otherrefbgcolor
+    remotebgcolor remoterefbgcolor otherrefbgcolor
     tagbgcolor tagfgcolor tagoutlinecolor reflinecolor
     filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor
     linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor
-- 
2.9.3
Previous: Michael HaggertyNext: Michael Haggerty
Message 4 of 24 in “gitk: tweak rendering of remote-tracking references”
  1. 00/13 gitk: tweak rendering of remote-tracking referencesMichael Haggerty, Dec 19, 2016
  2. 01/13 gitk: when processing tag labels, don't use `marks` as scratch spaceMichael Haggerty, Dec 19, 2016
  3. 02/13 gitk: keep track of tag types in a separate `types` arrayMichael Haggerty, Dec 19, 2016
  4. 12/13 gitk: add a configuration setting `remoterefbgcolor`Michael Haggerty, Dec 19, 2016
  5. 07/13 gitk: extract a method `remotereftext`Michael Haggerty, Dec 19, 2016
  6. 06/13 gitk: simplify regexpMichael Haggerty, Dec 19, 2016
  7. 04/13 gitk: use a type "mainhead" to indicate the main HEAD branchMichael Haggerty, Dec 19, 2016
  8. 08/13 gitk: only change the color of the "remote" part of remote refsMichael Haggerty, Dec 19, 2016
  9. 05/13 gitk: fill in `wvals` as the tags are first processedMichael Haggerty, Dec 19, 2016
  10. 09/13 gitk: shorten labels displayed for modern remote-tracking refsMichael Haggerty, Dec 19, 2016
  11. 10/13 gitk: use type "remote" for remote-tracking referencesMichael Haggerty, Dec 19, 2016
  12. 11/13 gitk: introduce a constant otherrefbgcolorMichael Haggerty, Dec 19, 2016
  13. 13/13 gitk: change the default colors for remote-tracking referencesMichael Haggerty, Dec 19, 2016
  14. 03/13 gitk: use a type "tags" to indicate abbreviated tagsMichael Haggerty, Dec 19, 2016
  15. Philip OakleyDec 19, 2016
  16. Michael HaggertyDec 20, 2016
  17. Marc BranchaudDec 20, 2016
  18. Paul MackerrasDec 20, 2016
  19. Marc BranchaudDec 20, 2016
  20. Michael HaggertyDec 21, 2016
  21. Marc BranchaudDec 21, 2016
  22. Michael HaggertyDec 22, 2016
  23. Marc BranchaudJan 9, 2017
  24. Marc BranchaudFeb 6, 2017

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.