Skip to content

Commit ec02983

Browse files
committed
gitk: wheel scrolling multiplier preference
gitk provides scrolling of several windows, uses hard-coded values for the amount of scrolling, and these values differ across platforms and widgets. The nominal value used is either 1 text line per mouse / touchpad / button event, or 5 lines. Furthermore, Tk does not scroll text widgets by 1 line when told to, this usually gets 2-3 lines of motion. The upper canvas objects holding the commit graph do scroll as defined. But, clearly no value is universally preferred, so let's give the user some control over this. Provide a single multiplier to be applied for all scroll bindings, with a value of 3 to mean the default nominal value of 3 line. This is selected both as a compromise between the various defaults across platforms, and because it is the smallest value honored by the two text widgets on the bottom of the screen. Later commits will connect this variable for actual scrolling events. Signed-off-by: Mark Levedahl <[email protected]>
1 parent 3489ff1 commit ec02983

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gitk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11593,6 +11593,9 @@ proc prefspage_general {notebook} {
1159311593
spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen
1159411594
ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"]
1159511595
grid x $page.autosellenl $page.autosellen -sticky w
11596+
ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"]
11597+
spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll
11598+
grid x $page.kscroll1 $page.kscroll -sticky w
1159611599
1159711600
ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
1159811601
grid $page.ddisp - -sticky w -pady 10
@@ -12369,6 +12372,7 @@ set visiblerefs {"master"}
1236912372
set maxlinelen 200
1237012373
set showlocalchanges 1
1237112374
set limitdiffs 1
12375+
set kscroll 3
1237212376
set datetimeformat "%Y-%m-%d %H:%M:%S"
1237312377
set autocopy 0
1237412378
set autoselect 1
@@ -12490,6 +12494,7 @@ set config_variables {
1249012494
headoutlinecolor
1249112495
hideremotes
1249212496
indexcirclecolor
12497+
kscroll
1249312498
limitdiffs
1249412499
linehoverbgcolor
1249512500
linehoverfgcolor

0 commit comments

Comments
 (0)