5

git gui is a pretty useful graphical client, but it's utility is somewhat by the coloring of the diff: Context text is typeset in black (hence overly emphasized), while changes are highlighted in weak shades of red and green – a problem with partial red-green color blindness.

For git diff the colors can be configured (settings color.diff.*), but git gui ingores those settings.

Are there any settings available, that affect the color choices in git gui?

kdb
  • 4,098
  • 26
  • 49
  • I believe you can use a custom diff utility too, btw. – Dai Feb 28 '19 at 10:05
  • @Dai Would that custom diff utility still be integrated with the `git gui` though, or open as separate window? Since it doesn't respect `color.diff` settings, I assumed that `git gui` does the coloration itself, and thus would ignore anything produced by alternative diff tools, unless the diff-tool is external (e.g. https://stackoverflow.com/questions/12169973/invoking-external-difftool-from-git-gui). That would however sacrifice half the convenience of "all in one place". – kdb Feb 28 '19 at 18:39

1 Answers1

4

With Git 2.30 (Q1 2021),

See commit 4d22c05 (22 Nov 2020) by Serg Tereshchenko (last-partizan).
(Merged by Junio C Hamano -- gitster -- in commit f4d8e19, 18 Dec 2020)

git-gui: Fix selected text colors

Signed-off-by: Serg Tereshchenko
Signed-off-by: Pratyush Yadav

Added selected state colors for text widget.

Same colors for active and inactive selection, to match previous behaviour.

This suggests you can edit the Tcl sources of git-gui to change any color you need.
This was for instance suggested in "Dark theme for git gui"

Example of color customization:

With Git 2.30 (Q1 2021),

See commit da4d86d (18 Dec 2020), and commit f9481b1 (22 Nov 2020) by Stefan Haller (stefanhaller). (Merged by Junio C Hamano -- gitster -- in commit f4d8e19, 18 Dec 2020)

git-gui: use gray background for inactive text widgets

Signed-off-by: Stefan Haller
Signed-off-by: Pratyush Yadav

This makes it easier to see at a glance which of the four main views has the keyboard focus.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250