[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] CogVM source as per VMMaker.oscog-eem.2484 (897ef17)

Nicolas Cellier notifications at github.com
Fri Dec 27 11:37:22 UTC 2019

The other question is where the factor `32` comes from...

My understanding is that coordinates are expressed in typesetting points or pica (1/72.27 inches, rounded to 1/72 by Apple and some other software providers) - if current scale factor is = 1.
A usual font height is 12 points (1/6 inch), count about 2 points for interline, that makes about 14 points line grid.
Note that a point = a pixel in last century monitors having 72 pixels (dots) per inch, and also in Squeak...

My understanding is that `deltaX` and `deltaY` are in same coordinates units

We want to convert that to scrolling units.

In Squeak, we convert 120 scrolling units into 3 scrollDelta.
A scrollDelta typically is = lineHeight in text pane and font height in list pane.
So we want 120 scrollUnits = 3 scrollDelta = 36 to 40 points typically.
That makes roughly a factor * 3.

Though, with * 32, OSX trackpad scrolls feel sluggish, it would be far worse with * 3!
It's clear that I missed something...

Unless we should better use `scrollingDeltaY` for scroll wheel events as recommended in the link above...

In which case we should inquire `hasPreciseScrollingDeltas`

I'm not completely satisifed with Apple docs, so scanning github for crowd wisdom
I found example of * 32 in other code bases when not precise:

This is for OSX > 10.7 which can be tested like this:

I will try some experiments...

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191227/90733120/attachment.html>

More information about the Vm-dev mailing list