diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 16:48:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 16:48:25 (GMT) |
commit | e679b5a5baf3cdd0ce6dda5e85a22b0558e326fa (patch) | |
tree | abff3a24579137ebb46c1d74152046d4e1b9bc1e /library/ttk | |
parent | 3e0f865a142c5d9d73db773cdbf1e7a5303a2988 (diff) | |
download | tk-e679b5a5baf3cdd0ce6dda5e85a22b0558e326fa.zip tk-e679b5a5baf3cdd0ce6dda5e85a22b0558e326fa.tar.gz tk-e679b5a5baf3cdd0ce6dda5e85a22b0558e326fa.tar.bz2 |
For ttk::spinbox, reverse mouse handling, but keep other handlers the same
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/spinbox.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/ttk/spinbox.tcl b/library/ttk/spinbox.tcl index d11bc74..9f002cd 100644 --- a/library/ttk/spinbox.tcl +++ b/library/ttk/spinbox.tcl @@ -134,7 +134,7 @@ proc ttk::spinbox::Adjust {w v min max} { # Otherwise cycle through numeric range based on # -from, -to, and -increment. # -proc ttk::spinbox::Spin {w dir {factor 1.0}} { +proc ttk::spinbox::Spin {w dir {factor -1.0}} { variable State if {[$w instate disabled]} { return } @@ -146,7 +146,7 @@ proc ttk::spinbox::Spin {w dir {factor 1.0}} { set State($w,values) [$w cget -values] set State($w,values.length) [llength $State($w,values)] - set d [expr {($dir/$factor)}] + set d [expr {-($dir/$factor)}] set d [expr {int($d > 0 ? ceil($d) : floor($d))}] if {$State($w,values.length) > 0} { set value [$w get] |