summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2016-01-09 22:30:01 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2016-01-09 22:30:01 (GMT)
commit1a9265450e8fdd3f7d9cd4429fc5154650558798 (patch)
treeffbc1ac410beb03eb9a7066e0be4aadd748bbf53 /library
parenteee0519c863066ec4b4f1dc7548d94738fc6cc05 (diff)
downloadtk-1a9265450e8fdd3f7d9cd4429fc5154650558798.zip
tk-1a9265450e8fdd3f7d9cd4429fc5154650558798.tar.gz
tk-1a9265450e8fdd3f7d9cd4429fc5154650558798.tar.bz2
(cherry-pick) Fix [bug-1927212fff]: MouseWheel unbound for non-aqua scrollbars. Thanks to Francois Vogel for the actual work
FossilOrigin-Name: abd55889b589d96ee87bbfee532e3dfb33021383
Diffstat (limited to 'library')
-rw-r--r--library/scrlbar.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 4b25325..43ce4ae 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -141,6 +141,13 @@ if {[tk windowingsystem] eq "aqua"} {
bind Scrollbar <Shift-Option-MouseWheel> {
tk::ScrollByUnits %W h [expr {-10 * (%D)}]
}
+} else {
+ bind Scrollbar <MouseWheel> {
+ tk::ScrollByUnits %W v [expr {- (%D /120 ) * 4}]
+ }
+ bind Scrollbar <Shift-MouseWheel> {
+ tk::ScrollByUnits %W h [expr {- (%D /120 ) * 4}]
+ }
}
# tk::ScrollButtonDown --
# This procedure is invoked when a button is pressed in a scrollbar.