summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2023-11-24 20:12:04 (GMT)
committermarc_culler <marc.culler@gmail.com>2023-11-24 20:12:04 (GMT)
commit882e2f294e951a18ea24b7a5f1d6628bc5a4ae90 (patch)
treef15a065c99b16a2574da8eba43aca2bbd2c58a58 /library
parentc2966d199dcef759fb9bbab08c06116b080e7f7c (diff)
downloadtk-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')
-rw-r--r--library/scrlbar.tcl4
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
}
}