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

Re: [PATCH] gitk: support config the color of linkfgcolor via Gitk Preferences

From
Johannes Sixt <j6t@kdbg.org>
Date
Feb 27, 2026, 07:37 UTC
Message-ID
<ffd58cd5-811b-4ebf-8572-cca681ec9bf7@kdbg.org>
In-Reply-To
<pull.2217.git.git.1772109195114.gitgitgadget@gmail.com>
Am 26.02.26 um 13:33 schrieb Gary Wang via GitGitGadget:
Show 11 quoted lines
> From: Wang Zichong <wangzichong@deepin.org>
> 
> As a dark-theme user, I use the Preferences dialog to set colors
> for gitk, the only color I cannot change via that dialog is the
> link foreground color, which will lead me to use the default link
> color on a dark background that make it not really readable.
> 
> This patch makes the link foreground color also configurable in the
> Gitk Preferences dialog's Color tab, so user won't need to dig into
> the code/manual to know if the link color is configurable and can
> simply set the color there.
Makes sense.

Our usual style is to not say "This patch does X to...", but to write in imperative mood "Do X to...".

Show 5 quoted lines
> 
> CC: Mark Levedahl <mlevedahl@gmail.com>, Paul Mackerras <paulus@samba.org>
> Signed-off-by: Wang Zichong <wangzichong@deepin.org>
> ---
>     gitk: support config the color of linkfgcolor via Gitk Preferences
In the subject line, perhaps:
   gitk: support link color in the Preferences dialog
> +    label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor
> +    ttk::button $page.linkfgbut -text [mc "Link color"] \
> +        -command [list choosecolor linkfgcolor {} $page [mc "link color"]]

This text "link color" is used in the title of the color selection dialog. It then reads awkwardly "Gitk: choose color for link color". Let's just use the text "links" for this purpose, and then also just "Links" as the label on the button.

Show 5 quoted lines
> @@ -11891,6 +11896,7 @@ proc prefspage_set_colorswatches {page} {
>      $page.hunksep configure -background [lindex $diffcolors 2]
>      $page.markbgsep configure -background $markbgcolor
>      $page.selbgsep configure -background $selectbgcolor
> +    $page.linkfg configure -background $linkfgcolor

The variable's value is already serialized in the configuration and needs no additional treatment. Good.

-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “gitk: support config the color of linkfgcolor via Gitk Preferences”
  1. gitk: support config the color of linkfgcolor via Gitk PreferencesGary Wang via GitGitGadget, Feb 26, 2026
  2. Junio C HamanoFeb 26, 2026
  3. Johannes SixtFeb 27, 2026
  4. Junio C HamanoFeb 27, 2026
  5. Wang ZichongFeb 28, 2026
  6. Johannes SixtFeb 28, 2026
  7. Wang ZichongFeb 28, 2026
  8. gitk: support link color in the Preferences dialogGary Wang via GitGitGadget, Feb 28, 2026
  9. gitk: support link color in the Preferences dialogGary Wang via GitGitGadget, Feb 28, 2026
  10. Johannes SixtMar 1, 2026

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.