Skip to content

Commit b427787

Browse files
committed
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. CC: Mark Levedahl <mlevedahl@gmail.com> CC: Paul Mackerras <paulus@samba.org> CC: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Wang Zichong <wangzichong@deepin.org>
1 parent 7b2bccb commit b427787

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

gitk-git/gitk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11796,7 +11796,7 @@ proc prefspage_general {notebook} {
1179611796
1179711797
proc prefspage_colors {notebook} {
1179811798
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
11799-
global diffbgcolors
11799+
global diffbgcolors linkfgcolor
1180011800
global themeloader
1180111801
1180211802
set page [create_prefs_page $notebook.colors]
@@ -11873,14 +11873,19 @@ proc prefspage_colors {notebook} {
1187311873
-command [list choosecolor selectbgcolor {} $page [mc "background"]]
1187411874
grid x $page.selbgbut $page.selbgsep -sticky w
1187511875
11876+
label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor
11877+
ttk::button $page.linkfgbut -text [mc "Link"] \
11878+
-command [list choosecolor linkfgcolor {} $page [mc "link"]]
11879+
grid x $page.linkfgbut $page.linkfg -sticky w
11880+
1187611881
grid columnconfigure $page 2 -weight 1
1187711882
1187811883
return $page
1187911884
}
1188011885
1188111886
proc prefspage_set_colorswatches {page} {
1188211887
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
11883-
global diffbgcolors
11888+
global diffbgcolors linkfgcolor
1188411889
1188511890
$page.bg configure -background $bgcolor
1188611891
$page.fg configure -background $fgcolor
@@ -11891,6 +11896,7 @@ proc prefspage_set_colorswatches {page} {
1189111896
$page.hunksep configure -background [lindex $diffcolors 2]
1189211897
$page.markbgsep configure -background $markbgcolor
1189311898
$page.selbgsep configure -background $selectbgcolor
11899+
$page.linkfg configure -background $linkfgcolor
1189411900
}
1189511901
1189611902
proc prefspage_fonts {notebook} {

0 commit comments

Comments
 (0)