Skip to content

Commit

Permalink
mail/exmh2: Adjust MouseWheel scrolling parameters
Browse files Browse the repository at this point in the history
Units and pages don't mean the same thing they did before.
The number of pixels is in fact a divisor.

- MouseWheel scrolls one line in the Folder Display box (no change).
- MouseWheel scrolls five lines in the message box (no change).
- Shift-MouseWheel scrolls one line (no change).
- Control-MouseWheel scrolls ten lines (changed from a page as
  page doesn't work any more).
  • Loading branch information
cschuber committed Aug 31, 2021
1 parent f96f435 commit 4cf22b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mail/exmh2/Makefile
Expand Up @@ -4,7 +4,7 @@

PORTNAME= exmh
PORTVERSION= 2.9.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES+= mail tk
# XXX: Standard SF fails with a hung download
MASTER_SITES= https://sourceforge.net/projects/${PORTNAME}/files/${PORTNAME}/${PORTVERSION}/
Expand Down
8 changes: 4 additions & 4 deletions mail/exmh2/files/patch-lib_exwin.tcl
Expand Up @@ -18,11 +18,11 @@
+ # bind $bindtag <Control-Button-5> [list %W yview scroll 1 pages]
+ # bind $bindtag <Control-Button-4> [list %W yview scroll -1 pages]
+
+ # tcl 8.7a5 and later (units can be pixels/units/pages). See
+ # tcl 8.7a5 and later. See
+ # https://core.tcl-lang.org/tips/doc/trunk/tip/474.md for more info:
+ bind $bindtag <MouseWheel> [ list tk::MouseWheel %W y %D -$num units ]
+ bind $bindtag <Shift-MouseWheel> { tk::MouseWheel %W y %D -1 units }
+ bind $bindtag <Shift-MouseWheel> { tk::MouseWheel %W y %D -1 pages }
+ bind $bindtag <MouseWheel> [ list tk::MouseWheel %W y %D [ expr 10/-$num ] pixels ]
+ bind $bindtag <Shift-MouseWheel> { tk::MouseWheel %W y %D -10 pixels }
+ bind $bindtag <Control-MouseWheel> { tk::MouseWheel %W y %D -1 pixels }
}


0 comments on commit 4cf22b5

Please sign in to comment.