aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorWang Zichong <wangzichong@deepin.org>2026-02-28 07:59:44 +0000
committerJohannes Sixt <j6t@kdbg.org>2026-03-01 11:22:45 +0100
commitde4201af7d57b2da6981884e969fe1e6d327108c (patch)
tree146e0665f44c2785767aefd9bdf9a1723477d53c /gitk
parentddae547e3775638c238c11f30120f1e7e763fba8 (diff)
downloadgit-de4201af7d57b2da6981884e969fe1e6d327108c.tar.xz
gitk: support link color in the Preferences dialog
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 leads to using the default link color on a dark background that makes it hard to read. Make the link foreground color also configurable in the Gitk Preferences dialog's Color tab, so users won't need to dig into the code/manual to check if it is configurable and can simply set the color there. Signed-off-by: Wang Zichong <wangzichong@deepin.org> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk10
1 files changed, 8 insertions, 2 deletions
diff --git a/gitk b/gitk
index cbaaee994e..1c289174d5 100755
--- a/gitk
+++ b/gitk
@@ -11796,7 +11796,7 @@ proc prefspage_general {notebook} {
proc prefspage_colors {notebook} {
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
- global diffbgcolors
+ global diffbgcolors linkfgcolor
global themeloader
set page [create_prefs_page $notebook.colors]
@@ -11873,6 +11873,11 @@ proc prefspage_colors {notebook} {
-command [list choosecolor selectbgcolor {} $page [mc "background"]]
grid x $page.selbgbut $page.selbgsep -sticky w
+ label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor
+ ttk::button $page.linkfgbut -text [mc "Link"] \
+ -command [list choosecolor linkfgcolor {} $page [mc "link"]]
+ grid x $page.linkfgbut $page.linkfg -sticky w
+
grid columnconfigure $page 2 -weight 1
return $page
@@ -11880,7 +11885,7 @@ proc prefspage_colors {notebook} {
proc prefspage_set_colorswatches {page} {
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
- global diffbgcolors
+ global diffbgcolors linkfgcolor
$page.bg configure -background $bgcolor
$page.fg configure -background $fgcolor
@@ -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
}
proc prefspage_fonts {notebook} {