gitk: use themed spinboxes

gitk uses classic (non-themed) spinboxes rather than the ttk variants. Commit d93f1713b0 ("gitk: Use themed tk widgets", 2009-04-17) that added ttk makes no mention of why ttk:spinboxes were omitted, but this leads to an inconsistent interface. Let's use the ttk version. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>

Mark Levedahl committed Sep 21, 2025 at 09:46 UTC 811b8a34b9e081fdf885d83d21caa04408038889
1 file changed +7 -7
gitk
+7 -7
@@ -2656,7 +2656,7 @@ proc makewindow {} {
2656
2657 ttk::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
2658 pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left -ipadx $wgap
2659 - spinbox .bleft.mid.diffcontext -width 5 \
2659 + ttk::spinbox .bleft.mid.diffcontext -width 5 \
2660 -from 0 -increment 1 -to 10000000 \
2661 -validate all -validatecommand "diffcontextvalidate %P" \
2662 -textvariable diffcontextstring
@@ -11692,11 +11692,11 @@ proc prefspage_general {notebook} {
11692 grid $page.ldisp - -sticky w -pady 10
11693 ttk::label $page.spacer -text " "
11694 ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
11695 - spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
11695 + ttk::spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
11696 grid $page.spacer $page.maxwidthl $page.maxwidth -sticky w
11697 #xgettext:no-tcl-format
11698 ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
11699 - spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
11699 + ttk::spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
11700 grid x $page.maxpctl $page.maxpct -sticky w
11701 ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \
11702 -variable showlocalchanges
@@ -11721,17 +11721,17 @@ proc prefspage_general {notebook} {
11721 grid x $page.autoselect -sticky w
11722 }
11723
11724 - spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen
11724 + ttk::spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen
11725 ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"]
11726 grid x $page.autosellenl $page.autosellen -sticky w
11727 ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"]
11728 - spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll
11728 + ttk::spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll
11729 grid x $page.kscroll1 $page.kscroll -sticky w
11730
11731 ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
11732 grid $page.ddisp - -sticky w -pady 10
11733 ttk::label $page.tabstopl -text [mc "Tab spacing"]
11734 - spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
11734 + ttk::spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
11735 grid x $page.tabstopl $page.tabstop -sticky w
11736
11737 ttk::label $page.wrapcommentl -text [mc "Wrap comment text"]
@@ -11746,7 +11746,7 @@ proc prefspage_general {notebook} {
11746 -variable showneartags
11747 grid x $page.ntag -sticky w
11748 ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
11749 - spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs
11749 + ttk::spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs
11750 grid x $page.maxrefsl $page.maxrefs -sticky w
11751 ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
11752 -variable limitdiffs