summaryrefslogtreecommitdiffstats
path: root/library/ttk/scrollbar.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/ttk/scrollbar.tcl')
-rw-r--r--library/ttk/scrollbar.tcl21
1 files changed, 5 insertions, 16 deletions
diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl
index 7537491..8f6cf64 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/ttk/scrollbar.tcl
@@ -19,21 +19,8 @@ bind TScrollbar <ButtonRelease-2> { ttk::scrollbar::Release %W %x %y }
# Redirect scrollwheel bindings to the scrollbar widget
#
-# The shift-bindings scroll left/right (not up/down)
-# if a widget has both possibilities
-set eventList [list <MouseWheel>]
-switch [tk windowingsystem] {
- aqua {
- lappend eventList <Option-MouseWheel>
- }
- x11 {
- lappend eventList <Button-4> <Button-5> <Button-6> <Button-7>
- }
-}
-foreach event $eventList {
- bind TScrollbar $event [bind Scrollbar $event]
-}
-unset eventList event
+bind TScrollbar <MouseWheel> [bind Scrollbar <MouseWheel>]
+bind TScrollbar <Option-MouseWheel> [bind Scrollbar <Option-MouseWheel>]
proc ttk::scrollbar::Scroll {w n units} {
set cmd [$w cget -command]
@@ -56,7 +43,7 @@ proc ttk::scrollbar::Press {w x y} {
set State(yPress) $y
switch -glob -- [$w identify $x $y] {
- *uparrow -
+ *uparrow -
*leftarrow {
ttk::Repeatedly Scroll $w -1 units
}
@@ -64,6 +51,7 @@ proc ttk::scrollbar::Press {w x y} {
*rightarrow {
ttk::Repeatedly Scroll $w 1 units
}
+ *grip -
*thumb {
set State(first) [lindex [$w get] 0]
}
@@ -109,6 +97,7 @@ proc ttk::scrollbar::Jump {w x y} {
variable State
switch -glob -- [$w identify $x $y] {
+ *grip -
*thumb -
*trough {
set State(first) [$w fraction $x $y]