diff options
Diffstat (limited to 'library/ttk/spinbox.tcl')
-rw-r--r-- | library/ttk/spinbox.tcl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/ttk/spinbox.tcl b/library/ttk/spinbox.tcl index 5aca894..0160d35 100644 --- a/library/ttk/spinbox.tcl +++ b/library/ttk/spinbox.tcl @@ -27,6 +27,13 @@ ttk::bindMouseWheel TSpinbox { ttk::spinbox::Spin %W } bind TSpinbox <Shift-MouseWheel> { # Ignore the event } +bind TSpinbox <TouchpadScroll> { + lassign [tk::PreciseScrollDeltas %D] deltaX deltaY + # TouchpadScroll events fire about 60 times per second. + if {$deltaY != 0 && [expr {%# %% 12}] == 0} { + ttk::spinbox::Spin %W [expr {$deltaY > 0 ? -1 : 1}] + } +} ## Motion -- # Sets cursor. |