From: Mark Levedahl Date: Wed, 1 Oct 2025 03:28:36 +0000 (-0400) Subject: gitk: separate code blocks for configuration dialog X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e65d38064c6ab981955f64b75f8cc068f25a415;p=thirdparty%2Fgit.git 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 --- diff --git a/gitk b/gitk index c52ffd0fc4..67d2dced42 100755 --- a/gitk +++ b/gitk @@ -11650,6 +11650,7 @@ proc prefspage_general {notebook} { ttk::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold grid $page.ldisp - -sticky w -pady 10 + ttk::label $page.spacer -text " " ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"] ttk::spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth @@ -11658,9 +11659,11 @@ proc prefspage_general {notebook} { ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"] ttk::spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct grid x $page.maxpctl $page.maxpct -sticky w + ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \ -variable showlocalchanges grid x $page.showlocal -sticky w + ttk::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \ -variable hideremotes grid x $page.hideremotes -sticky w @@ -11673,6 +11676,7 @@ proc prefspage_general {notebook} { ttk::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \ -variable autocopy grid x $page.autocopy -sticky w + if {[haveselectionclipboard]} { ttk::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \ -variable autoselect @@ -11682,12 +11686,14 @@ proc prefspage_general {notebook} { ttk::spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"] grid x $page.autosellenl $page.autosellen -sticky w + ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"] ttk::spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll grid x $page.kscroll1 $page.kscroll -sticky w ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold grid $page.ddisp - -sticky w -pady 10 + ttk::label $page.tabstopl -text [mc "Tab spacing"] ttk::spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop grid x $page.tabstopl $page.tabstop -sticky w @@ -11703,12 +11709,15 @@ proc prefspage_general {notebook} { ttk::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \ -variable showneartags grid x $page.ntag -sticky w + ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"] ttk::spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs grid x $page.maxrefsl $page.maxrefs -sticky w + ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \ -variable limitdiffs grid x $page.ldiff -sticky w + ttk::checkbutton $page.lattr -text [mc "Support per-file encodings"] \ -variable perfile_attrs grid x $page.lattr -sticky w @@ -11742,6 +11751,7 @@ proc prefspage_colors {notebook} { ttk::label $page.themesel -font mainfontbold \ -text [mc "Themes - change requires restart"] grid $page.themesel - -sticky w -pady 10 + ttk::label $page.themelabel -text [mc "Theme to use after restart"] makedroplist $page.theme theme {*}[lsort [ttk::style theme names]] grid x $page.themelabel $page.theme -sticky w @@ -11769,34 +11779,42 @@ proc prefspage_colors {notebook} { ttk::button $page.bgbut -text [mc "Background"] \ -command [list choosecolor bgcolor {} $page [mc "background"]] grid x $page.bgbut $page.bg -sticky w + label $page.fg -padx 40 -relief sunk -background $fgcolor ttk::button $page.fgbut -text [mc "Foreground"] \ -command [list choosecolor fgcolor {} $page [mc "foreground"]] grid x $page.fgbut $page.fg -sticky w + label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0] ttk::button $page.diffoldbut -text [mc "Diff: old lines"] \ -command [list choosecolor diffcolors 0 $page [mc "diff old lines"]] grid x $page.diffoldbut $page.diffold -sticky w + label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0] ttk::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \ -command [list choosecolor diffbgcolors 0 $page [mc "diff old lines bg"]] grid x $page.diffoldbgbut $page.diffoldbg -sticky w + label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1] ttk::button $page.diffnewbut -text [mc "Diff: new lines"] \ -command [list choosecolor diffcolors 1 $page [mc "diff new lines"]] grid x $page.diffnewbut $page.diffnew -sticky w + label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1] ttk::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \ -command [list choosecolor diffbgcolors 1 $page [mc "diff new lines bg"]] grid x $page.diffnewbgbut $page.diffnewbg -sticky w + label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2] ttk::button $page.hunksepbut -text [mc "Diff: hunk header"] \ -command [list choosecolor diffcolors 2 $page [mc "diff hunk header"]] grid x $page.hunksepbut $page.hunksep -sticky w + label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor ttk::button $page.markbgbut -text [mc "Marked line bg"] \ -command [list choosecolor markbgcolor {} $page [mc "marked line background"]] grid x $page.markbgbut $page.markbgsep -sticky w + label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor ttk::button $page.selbgbut -text [mc "Select bg"] \ -command [list choosecolor selectbgcolor {} $page [mc "background"]]