Import Tk 8.6.12
This commit is contained in:
@@ -303,19 +303,14 @@ proc ttk::bindMouseWheel {bindtag callback} {
|
||||
}
|
||||
if {[tk windowingsystem] eq "aqua"} {
|
||||
bind $bindtag <MouseWheel> "$callback \[expr {-%D}\]"
|
||||
bind $bindtag <Option-MouseWheel> "$callback \[expr {-10*%D}\]"
|
||||
bind $bindtag <Option-MouseWheel> "$callback \[expr {-10 * %D}\]"
|
||||
} else {
|
||||
bind $bindtag <MouseWheel> "$callback \[expr {-%D/120}\]"
|
||||
bind $bindtag <MouseWheel> "$callback \[expr {-%D / 120}\]"
|
||||
}
|
||||
}
|
||||
|
||||
## Mousewheel bindings for standard scrollable widgets.
|
||||
#
|
||||
# Usage: [ttk::copyBindings TtkScrollable $bindtag]
|
||||
#
|
||||
# $bindtag should be for a widget that supports the
|
||||
# standard scrollbar protocol.
|
||||
#
|
||||
|
||||
if {[tk windowingsystem] eq "x11"} {
|
||||
bind TtkScrollable <Button-4> { %W yview scroll -5 units }
|
||||
@@ -325,18 +320,18 @@ if {[tk windowingsystem] eq "x11"} {
|
||||
}
|
||||
if {[tk windowingsystem] eq "aqua"} {
|
||||
bind TtkScrollable <MouseWheel> \
|
||||
{ %W yview scroll [expr {-(%D)}] units }
|
||||
{ %W yview scroll [expr {-%D}] units }
|
||||
bind TtkScrollable <Shift-MouseWheel> \
|
||||
{ %W xview scroll [expr {-(%D)}] units }
|
||||
{ %W xview scroll [expr {-%D}] units }
|
||||
bind TtkScrollable <Option-MouseWheel> \
|
||||
{ %W yview scroll [expr {-10 * (%D)}] units }
|
||||
{ %W yview scroll [expr {-10 * %D}] units }
|
||||
bind TtkScrollable <Shift-Option-MouseWheel> \
|
||||
{ %W xview scroll [expr {-10 * (%D)}] units }
|
||||
{ %W xview scroll [expr {-10 * %D}] units }
|
||||
} else {
|
||||
bind TtkScrollable <MouseWheel> \
|
||||
{ %W yview scroll [expr {-(%D / 120)}] units }
|
||||
{ %W yview scroll [expr {-%D / 120}] units }
|
||||
bind TtkScrollable <Shift-MouseWheel> \
|
||||
{ %W xview scroll [expr {-(%D / 120)}] units }
|
||||
{ %W xview scroll [expr {-%D / 120}] units }
|
||||
}
|
||||
|
||||
#*EOF*
|
||||
|
||||
Reference in New Issue
Block a user