kdb
kdb

Reputation: 4416

Customize colors in "git gui"?

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?

Upvotes: 5

Views: 1427

Answers (1)

VonC
VonC

Reputation: 1324318

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.

Upvotes: 4

Related Questions