Skip to content

Commit 24fb77a

Browse files
committed
gitk: update aqua scrolling for TclTk 8.6 / TIP171
Tk provides MouseWheel events to aqua, similar to win32. But, these events on aqua have a nominal motion value (%D) of 1, not 120 as on win32. gitk on aqua provides specific bindings only for the top 3 panes, giving a nominal scrolling amount of +/- 1 for all events. gitk includes a hidden feature providing horizontal scrolling of the commit graph, added in 5fdcbb1 ("gitk: Fixes for Mac OS X TkAqua", 2009-03-23). This horizontal scrolling is triggered by mouse events in any of the top 3 panes, and thus violates normal gui design where the object under the mouse cursor scrolls. Let's update this using the common bindings in 'proc bind_mousewheel', allowing user preferences on motion scaling to apply to all windows. The commit graph scrolling feature is removed by this, and will be added back for all platforms in a later commit. Signed-off-by: Mark Levedahl <[email protected]>
1 parent 82f0b92 commit 24fb77a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

gitk

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,14 +2735,8 @@ proc makewindow {} {
27352735
set scroll_D0 1
27362736
bind_mousewheel_buttons
27372737
} elseif {[tk windowingsystem] == "aqua"} {
2738-
bindall <MouseWheel> {
2739-
set delta [expr {- (%D)}]
2740-
allcanvs yview scroll $delta units
2741-
}
2742-
bindall <Shift-MouseWheel> {
2743-
set delta [expr {- (%D)}]
2744-
$canv xview scroll $delta units
2745-
}
2738+
set scroll_D0 1
2739+
bind_mousewheel
27462740
} else {
27472741
puts stderr [mc "Unknown windowing system, cannot bind mouse"]
27482742
}

0 commit comments

Comments
 (0)