summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsaba <csaba>2024-06-21 20:10:06 (GMT)
committercsaba <csaba>2024-06-21 20:10:06 (GMT)
commit74acf64ef4a52d7b938ec54ffa39e337a3adc924 (patch)
tree604d43667059ea145fb71c01886e2836330c80dd
parentd8f413f14fe9ebb616469e0e2fd6552d8add2b35 (diff)
downloadtk-74acf64ef4a52d7b938ec54ffa39e337a3adc924.zip
tk-74acf64ef4a52d7b938ec54ffa39e337a3adc924.tar.gz
tk-74acf64ef4a52d7b938ec54ffa39e337a3adc924.tar.bz2
Updated the Widget Demo script cscroll.tcl.
-rw-r--r--library/demos/cscroll.tcl11
-rw-r--r--library/demos/widget2
2 files changed, 6 insertions, 7 deletions
diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl
index 98a4be2..b155d37 100644
--- a/library/demos/cscroll.tcl
+++ b/library/demos/cscroll.tcl
@@ -79,7 +79,7 @@ if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk
# (int)1/-30 = -1,
# but
# (int)-1/-30 = 0
- # The following code ensure equal +/- behaviour.
+ # The following code ensures equal +/- behaviour.
bind $c <MouseWheel> {
if {%D >= 0} {
%W yview scroll [expr {%D/-30}] units
@@ -89,9 +89,9 @@ if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk
}
bind $c <Option-MouseWheel> {
if {%D >= 0} {
- %W yview scroll [expr {%D/-3}] units
+ %W yview scroll [expr {%D/-12}] units
} else {
- %W yview scroll [expr {(%D-2)/-3}] units
+ %W yview scroll [expr {(%D-11)/-12}] units
}
}
bind $c <Shift-MouseWheel> {
@@ -103,9 +103,9 @@ if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk
}
bind $c <Shift-Option-MouseWheel> {
if {%D >= 0} {
- %W xview scroll [expr {%D/-3}] units
+ %W xview scroll [expr {%D/-12}] units
} else {
- %W xview scroll [expr {(%D-2)/-3}] units
+ %W xview scroll [expr {(%D-11)/-12}] units
}
}
}
@@ -137,7 +137,6 @@ if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide Tk] 8
}
}
-
proc scrollEnter canvas {
global oldFill
set id [$canvas find withtag current]
diff --git a/library/demos/widget b/library/demos/widget
index 59a8d34..4c0d4ad 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,7 +10,7 @@ exec wish "$0" ${1+"$@"}
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
-package require Tk 8.5
+package require Tk 8.5-
package require msgcat
destroy {*}[winfo children .]