diff options
author | marc_culler <marc.culler@gmail.com> | 2023-11-24 20:12:04 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2023-11-24 20:12:04 (GMT) |
commit | 882e2f294e951a18ea24b7a5f1d6628bc5a4ae90 (patch) | |
tree | f15a065c99b16a2574da8eba43aca2bbd2c58a58 /library/scrlbar.tcl | |
parent | c2966d199dcef759fb9bbab08c06116b080e7f7c (diff) | |
download | tk-882e2f294e951a18ea24b7a5f1d6628bc5a4ae90.zip tk-882e2f294e951a18ea24b7a5f1d6628bc5a4ae90.tar.gz tk-882e2f294e951a18ea24b7a5f1d6628bc5a4ae90.tar.bz2 |
Fix scrollbar <Control-Mousewheel> bindings toto ensure that horizontal gestures do not produce vertical motion and vice versa.
Diffstat (limited to 'library/scrlbar.tcl')
-rw-r--r-- | library/scrlbar.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 19ff33a..d992d92 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -139,10 +139,10 @@ bind Scrollbar <MouseWheel> { bind Scrollbar <Control-MouseWheel> { lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0} { + if {$deltaX != 0 && [%W cget -orient] eq "horizontal"} { tk::ScrollbarScrollByPixels %W h $deltaX } - if {$deltaY != 0} { + if {$deltaY != 0 && [%W cget -orient] eq "vertical"} { tk::ScrollbarScrollByPixels %W v $deltaY } } |