diff options
Diffstat (limited to 'library/scrlbar.tcl')
-rw-r--r-- | library/scrlbar.tcl | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 4cb95bd..9277160 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -128,18 +128,34 @@ bind Scrollbar <End> { tk::ScrollToPos %W 1 } } -if {[tk windowingsystem] eq "aqua"} { - bind Scrollbar <MouseWheel> { - tk::ScrollByUnits %W v [expr {- (%D)}] - } - bind Scrollbar <Option-MouseWheel> { - tk::ScrollByUnits %W v [expr {-10 * (%D)}] +switch [tk windowingsystem] { + "aqua" { + bind Scrollbar <MouseWheel> { + tk::ScrollByUnits %W v [expr {- (%D)}] + } + bind Scrollbar <Option-MouseWheel> { + tk::ScrollByUnits %W v [expr {-10 * (%D)}] + } + bind Scrollbar <Shift-MouseWheel> { + tk::ScrollByUnits %W h [expr {- (%D)}] + } + bind Scrollbar <Shift-Option-MouseWheel> { + tk::ScrollByUnits %W h [expr {-10 * (%D)}] + } } - bind Scrollbar <Shift-MouseWheel> { - tk::ScrollByUnits %W h [expr {- (%D)}] + "win32" { + 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 <Shift-Option-MouseWheel> { - tk::ScrollByUnits %W h [expr {-10 * (%D)}] + "x11" { + 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} + bind Scrollbar <Shift-5> {tk::ScrollByUnits %W h 5} } } # tk::ScrollButtonDown -- |