From: Shannon Barber <sbarber@dataspeedinc.com>
The drawtags procedure currently uses headfgcolor for all label text,
ignoring the tagfgcolor setting.
The call to create the outline polygon for (non-tag) heads currently
has the color for headoutlinecolor hardcoded to black.
This patch maintains the variables for the non-tag refs so that heads
are colored differently from non-head (non-tag) refs.
The outline and fill colors for the non-head refs remain hardcoded to
the prior values, black & #ddddff.
Signed-off-by: Shannon Barber <sgbarber@gmail.com>
---
gitk: use headoutlinecolor, headbgcolor, and tagfgcolor config settings
to change the color of the tags and head outlines and fill
This patch makes the config settings, headoutlinecolor and tagfgcolor,
work. These are existing config settings but not used in the code.
(I noticed that tagfgcolor was not working while making an extension for
vscode that exports its color theme to gitk.) (Upon review of the code I
found that headoutlinecolor was also not used and investigated and fixed
it.)
This simple patch has them affect the target UI elements while drawing
refs and their outlined boxes. Tags are drawn in their own code branch
then heads and non-heads are drawn in another one. Because both head and
non-head refs are drawn in the same loop the colors used to draw (and
fill) toggle between the head colors and (still hard-coded) non-head ref
colors.
Image showing it working, reviewing the patch that made it work.
gitk-colors
[https://github.com/user-attachments/assets/0eea207d-0891-41c8-8c6d-1464a96a1c76]Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2030%2FMagmaiKH%2Fsbarber%2Fuse_color_config_variables-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2030/MagmaiKH/sbarber/use_color_config_variables-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2030
gitk-git/gitk | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)