From: SourceForge.net <no...@so...> - 2003-12-05 10:40:30
|
Bugs item #833606, was opened at 2003-10-31 13:06 Message generated for change (Comment added) made by vincentdarley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=833606&group_id=12997 Category: 18. [text] Group: obsolete: 8.4.4 Status: Open Resolution: None Priority: 8 Submitted By: Vince Darley (vincentdarley) Assigned to: Jeffrey Hobbs (hobbs) Summary: mousewheel binding incorrect Initial Comment: The text.tcl binding: bind Text <MouseWheel> { %W yview scroll [expr {- (%D / 120) * 4}] units } isn't right. If '%D' is a smallish positive number (e.g. 100), then the whole expression is rounded down to zero and no scrolling takes place. This is different to the case where %D is a smallish negative number, where the expression will always be rounded down to -1 * 4, and scrolling will take place. I believe we should use something like: if {%D < 0} { %W yview scroll [expr {- (%D / 120) * 4}] units } else { %W yview scroll [expr { (-%D / 120) * 4}] units } On a separate note, I believe the magnitudes of %D between the Windows and MacOS X implementations of this binding are totally different. The documentation says the smallest value on Windows is 120. On MacOS X it has a smallest value of 1, I believe. This suggests something like this would be correct: if {[tk windowingsystem] eq "aqua"} { bind Alpha <MouseWheel> { %W yview scroll [expr {-%D * 4}] units } } else { bind Alpha <MouseWheel> { if {%D < 0} { %W yview scroll [expr {- (%D / 120) * 4}] units } else { %W yview scroll [expr { (-%D / 120) * 4}] units } } } ---------------------------------------------------------------------- >Comment By: Vince Darley (vincentdarley) Date: 2003-12-05 10:40 Message: Logged In: YES user_id=32170 See tkMacOSXMouseEvent.c in cvs HEAD, e.g.: GenerateMouseWheelEvent ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2003-11-27 01:51 Message: Logged In: YES user_id=72656 I don't see the MouseWheel event triggering at all on aqua. Is there some extra magic there (or more recent than 8.4.4 support for it)? ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2003-11-11 18:39 Message: Logged In: YES user_id=72656 This will need specific testing across platforms - delay to 8.5 alpha release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=833606&group_id=12997 |