diff options
author | culler <culler> | 2023-11-09 17:46:56 (GMT) |
---|---|---|
committer | culler <culler> | 2023-11-09 17:46:56 (GMT) |
commit | 2fda4b1460a44e8d143882fc8fa3162f7ebe4c1d (patch) | |
tree | c934b2002e6d3a5c69deeef4293c061979640842 /library | |
parent | e6018fcddfed44488ca47e5008ca7ad0a31d9e74 (diff) | |
download | tk-2fda4b1460a44e8d143882fc8fa3162f7ebe4c1d.zip tk-2fda4b1460a44e8d143882fc8fa3162f7ebe4c1d.tar.gz tk-2fda4b1460a44e8d143882fc8fa3162f7ebe4c1d.tar.bz2 |
Remove the delta accumulator; allow a Text to scroll at pixel resolution; use scrollingDelta correctly.
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/library/text.tcl b/library/text.tcl index e5a4c11..c827232 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -456,9 +456,16 @@ bind Text <B2-Motion> { } set ::tk::Priv(prevPos) {} -bind Text <MouseWheel> { - tk::MouseWheel %W y [tk::ScaleNum %D] -4.0 pixels +if {[tk windowingsystem] eq "aqua"} { + bind Text <MouseWheel> { + tk::MouseWheel %W y [tk::ScaleNum %D] -1.0 pixels + } +} else { + bind Text <MouseWheel> { + tk::MouseWheel %W y [tk::ScaleNum %D] -4.0 pixels + } } + bind Text <Option-MouseWheel> { tk::MouseWheel %W y [tk::ScaleNum %D] -1.2 pixels } |