diff options
author | dgp <dgp@users.sourceforge.net> | 2019-11-15 20:45:48 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2019-11-15 20:45:48 (GMT) |
commit | e7890d24922a6058d88dda2bcb7cc87989ab7800 (patch) | |
tree | ac1574045b87fbb0f510ff8ac9cee43e2dfe6ef5 /library | |
parent | b61f8b2b16911a35398b1eb3d20ede6257959408 (diff) | |
parent | 21c80c279f1a6edee55718c40818e5a3f59e1dfb (diff) | |
download | tk-e7890d24922a6058d88dda2bcb7cc87989ab7800.zip tk-e7890d24922a6058d88dda2bcb7cc87989ab7800.tar.gz tk-e7890d24922a6058d88dda2bcb7cc87989ab7800.tar.bz2 |
merge 8.6
Diffstat (limited to 'library')
-rw-r--r-- | library/iconlist.tcl | 6 | ||||
-rw-r--r-- | library/listbox.tcl | 12 | ||||
-rw-r--r-- | library/scrlbar.tcl | 12 |
3 files changed, 23 insertions, 7 deletions
diff --git a/library/iconlist.tcl b/library/iconlist.tcl index 521ec37..eed7476 100644 --- a/library/iconlist.tcl +++ b/library/iconlist.tcl @@ -447,10 +447,10 @@ package require Tk 8.6 bind $canvas <Shift-B1-Motion> [namespace code {my ShiftMotion1 %x %y}] if {[tk windowingsystem] eq "aqua"} { - bind $canvas <Shift-MouseWheel> [namespace code {my MouseWheel [expr {40 * (%W)}]}] - bind $canvas <Option-Shift-MouseWheel> [namespace code {my MouseWheel [expr {400 * (%W)}]}] + bind $canvas <Shift-MouseWheel> [namespace code {my MouseWheel [expr {40 * (%D)}]}] + bind $canvas <Option-Shift-MouseWheel> [namespace code {my MouseWheel [expr {400 * (%D)}]}] } else { - bind $canvas <Shift-MouseWheel> [namespace code {my MouseWheel %W}] + bind $canvas <Shift-MouseWheel> [namespace code {my MouseWheel %D}] } if {[tk windowingsystem] eq "x11"} { bind $canvas <Shift-4> [namespace code {my MouseWheel 120}] diff --git a/library/listbox.tcl b/library/listbox.tcl index 2149e10..a094883 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -195,10 +195,18 @@ if {[tk windowingsystem] eq "aqua"} { } } else { bind Listbox <MouseWheel> { - %W yview scroll [expr {-(%D/30)}] units + if {%D >= 0} { + %W yview scroll [expr {-%D/30}] units + } else { + %W yview scroll [expr {(29-%D)/30}] units + } } bind Listbox <Shift-MouseWheel> { - %W xview scroll [expr {-(%D/30)}] units + if {%D >= 0} { + %W xview scroll [expr {-%D/30}] units + } else { + %W xview scroll [expr {(29-%D)/30}] units + } } } diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 65f29ee..a1c4398 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -144,10 +144,18 @@ if {[tk windowingsystem] eq "aqua"} { } } else { bind Scrollbar <MouseWheel> { - tk::ScrollByUnits %W v [expr {-(%D / 30)}] + if {%D >= 0} { + tk::ScrollByUnits %W v [expr {-%D/30}] + } else { + tk::ScrollByUnits %W v [expr {(29-%D)/30}] + } } bind Scrollbar <Shift-MouseWheel> { - tk::ScrollByUnits %W h [expr {-(%D / 30)}] + if {%D >= 0} { + tk::ScrollByUnits %W h [expr {-%D/30}] + } else { + tk::ScrollByUnits %W h [expr {(29-%D)/30}] + } } } |