gitk: separate code blocks for configuration dialog
gitk's configuration dialog uses a large number of widgets, and this code is hard to read as there is no easily recognizable grouping or breaks. Help this by adding space between items that occupy a single row in the dialog. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Mark Levedahl committed
Sep 30, 2025 at 23:28 UTC
8e65d38064c6ab981955f64b75f8cc068f25a415
1 file changed
+18
gitk
+18
@@ -11650,6 +11650,7 @@ proc prefspage_general {notebook} {
11650
11651
ttk::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold
11652
grid $page.ldisp - -sticky w -pady 10
11653
+
11654
ttk::label $page.spacer -text " "
11655
ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
11656
ttk::spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
@@ -11658,9 +11659,11 @@ proc prefspage_general {notebook} {
11659
ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
11660
ttk::spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
11661
grid x $page.maxpctl $page.maxpct -sticky w
11662
+
11663
ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \
11664
-variable showlocalchanges
11665
grid x $page.showlocal -sticky w
11666
+
11667
ttk::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
11668
-variable hideremotes
11669
grid x $page.hideremotes -sticky w
@@ -11673,6 +11676,7 @@ proc prefspage_general {notebook} {
11676
ttk::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \
11677
-variable autocopy
11678
grid x $page.autocopy -sticky w
11679
+
11680
if {[haveselectionclipboard]} {
11681
ttk::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \
11682
-variable autoselect
@@ -11682,12 +11686,14 @@ proc prefspage_general {notebook} {
11686
ttk::spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen
11687
ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"]
11688
grid x $page.autosellenl $page.autosellen -sticky w
11689
+
11690
ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"]
11691
ttk::spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll
11692
grid x $page.kscroll1 $page.kscroll -sticky w
11693
11694
ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
11695
grid $page.ddisp - -sticky w -pady 10
11696
+
11697
ttk::label $page.tabstopl -text [mc "Tab spacing"]
11698
ttk::spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
11699
grid x $page.tabstopl $page.tabstop -sticky w
@@ -11703,12 +11709,15 @@ proc prefspage_general {notebook} {
11709
ttk::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
11710
-variable showneartags
11711
grid x $page.ntag -sticky w
11712
+
11713
ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
11714
ttk::spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs
11715
grid x $page.maxrefsl $page.maxrefs -sticky w
11716
+
11717
ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
11718
-variable limitdiffs
11719
grid x $page.ldiff -sticky w
11720
+
11721
ttk::checkbutton $page.lattr -text [mc "Support per-file encodings"] \
11722
-variable perfile_attrs
11723
grid x $page.lattr -sticky w
@@ -11742,6 +11751,7 @@ proc prefspage_colors {notebook} {
11751
ttk::label $page.themesel -font mainfontbold \
11752
-text [mc "Themes - change requires restart"]
11753
grid $page.themesel - -sticky w -pady 10
11754
+
11755
ttk::label $page.themelabel -text [mc "Theme to use after restart"]
11756
makedroplist $page.theme theme {*}[lsort [ttk::style theme names]]
11757
grid x $page.themelabel $page.theme -sticky w
@@ -11769,34 +11779,42 @@ proc prefspage_colors {notebook} {
11779
ttk::button $page.bgbut -text [mc "Background"] \
11780
-command [list choosecolor bgcolor {} $page [mc "background"]]
11781
grid x $page.bgbut $page.bg -sticky w
11782
+
11783
label $page.fg -padx 40 -relief sunk -background $fgcolor
11784
ttk::button $page.fgbut -text [mc "Foreground"] \
11785
-command [list choosecolor fgcolor {} $page [mc "foreground"]]
11786
grid x $page.fgbut $page.fg -sticky w
11787
+
11788
label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]
11789
ttk::button $page.diffoldbut -text [mc "Diff: old lines"] \
11790
-command [list choosecolor diffcolors 0 $page [mc "diff old lines"]]
11791
grid x $page.diffoldbut $page.diffold -sticky w
11792
+
11793
label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0]
11794
ttk::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \
11795
-command [list choosecolor diffbgcolors 0 $page [mc "diff old lines bg"]]
11796
grid x $page.diffoldbgbut $page.diffoldbg -sticky w
11797
+
11798
label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]
11799
ttk::button $page.diffnewbut -text [mc "Diff: new lines"] \
11800
-command [list choosecolor diffcolors 1 $page [mc "diff new lines"]]
11801
grid x $page.diffnewbut $page.diffnew -sticky w
11802
+
11803
label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1]
11804
ttk::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \
11805
-command [list choosecolor diffbgcolors 1 $page [mc "diff new lines bg"]]
11806
grid x $page.diffnewbgbut $page.diffnewbg -sticky w
11807
+
11808
label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]
11809
ttk::button $page.hunksepbut -text [mc "Diff: hunk header"] \
11810
-command [list choosecolor diffcolors 2 $page [mc "diff hunk header"]]
11811
grid x $page.hunksepbut $page.hunksep -sticky w
11812
+
11813
label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor
11814
ttk::button $page.markbgbut -text [mc "Marked line bg"] \
11815
-command [list choosecolor markbgcolor {} $page [mc "marked line background"]]
11816
grid x $page.markbgbut $page.markbgsep -sticky w
11817
+
11818
label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor
11819
ttk::button $page.selbgbut -text [mc "Select bg"] \
11820
-command [list choosecolor selectbgcolor {} $page [mc "background"]]