summaryrefslogtreecommitdiffstats
path: root/library/scrlbar.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/scrlbar.tcl')
-rw-r--r--library/scrlbar.tcl8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 1f8c7d2..b7be014 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -15,7 +15,7 @@
#-------------------------------------------------------------------------
# Standard Motif bindings:
-if {[tk windowingsystem] eq "x11"} {
+if {[tk windowingsystem] eq "x11" || [tk windowingsystem] eq "aqua"} {
bind Scrollbar <Enter> {
if {$tk_strictMotif} {
@@ -152,6 +152,12 @@ switch [tk windowingsystem] {
}
}
"x11" {
+ bind Scrollbar <MouseWheel> {
+ tk::ScrollByUnits %W v [expr {- (%D /120 ) * 4}]
+ }
+ bind Scrollbar <Shift-MouseWheel> {
+ tk::ScrollByUnits %W h [expr {- (%D /120 ) * 4}]
+ }
bind Scrollbar <4> {tk::ScrollByUnits %W v -5}
bind Scrollbar <5> {tk::ScrollByUnits %W v 5}
bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5}