<p>The other question is where the factor <code>32</code> comes from...</p>
<p>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.<br>
<a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html" rel="nofollow">https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html</a><br>
A usual font height is 12 points (1/6 inch), count about 2 points for interline, that makes about 14 points line grid.<br>
Note that a point = a pixel in last century monitors having 72 pixels (dots) per inch, and also in Squeak...</p>
<p>My understanding is that <code>deltaX</code> and <code>deltaY</code> are in same coordinates units<br>
<a href="https://developer.apple.com/documentation/appkit/nsevent/1534158-deltay" rel="nofollow">https://developer.apple.com/documentation/appkit/nsevent/1534158-deltay</a></p>
<p>We want to convert that to scrolling units.</p>
<p>In Squeak, we convert 120 scrolling units into 3 scrollDelta.<br>
A scrollDelta typically is = lineHeight in text pane and font height in list pane.<br>
So we want 120 scrollUnits = 3 scrollDelta = 36 to 40 points typically.<br>
That makes roughly a factor * 3.</p>
<p>Though, with * 32, OSX trackpad scrolls feel sluggish, it would be far worse with * 3!<br>
It's clear that I missed something...</p>
<p>Unless we should better use <code>scrollingDeltaY</code> for scroll wheel events as recommended in the link above...<br>
<a href="https://developer.apple.com/documentation/appkit/nsevent/1535387-scrollingdeltay" rel="nofollow">https://developer.apple.com/documentation/appkit/nsevent/1535387-scrollingdeltay</a></p>
<p>In which case we should inquire <code>hasPreciseScrollingDeltas</code></p>
<p>I'm not completely satisifed with Apple docs, so scanning github for crowd wisdom<br>
I found example of * 32 in other code bases when not precise:<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/xi-editor/druid/commit/2cf48ec4a5928a58af4960adad4d098026f93a23/hovercard" href="https://github.com/xi-editor/druid/commit/2cf48ec4a5928a58af4960adad4d098026f93a23">xi-editor/druid@<tt>2cf48ec</tt></a></p>
<p>This is for OSX > 10.7 which can be tested like this:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="403453390" data-permission-text="Issue title is private" data-url="https://github.com/OpenTTD/OpenTTD/issues/7109" data-hovercard-type="pull_request" data-hovercard-url="/OpenTTD/OpenTTD/pull/7109/hovercard" href="https://github.com/OpenTTD/OpenTTD/pull/7109">OpenTTD/OpenTTD#7109</a></p>
<p>I will try some experiments...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b?email_source=notifications&email_token=AIJPEW3YXKEGGSK2ECQN2B3Q2XSHFA5CNFSM4J7G4EYKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBC4U62#commitcomment-36590554">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW4OHV2AFKDGPVQZKCTQ2XSHFANCNFSM4J7G4EYA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW3Y646R5LP2QSYDO2LQ2XSHFA5CNFSM4J7G4EYKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBC4U62.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b?email_source=notifications\u0026email_token=AIJPEW3YXKEGGSK2ECQN2B3Q2XSHFA5CNFSM4J7G4EYKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBC4U62#commitcomment-36590554",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b?email_source=notifications\u0026email_token=AIJPEW3YXKEGGSK2ECQN2B3Q2XSHFA5CNFSM4J7G4EYKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBC4U62#commitcomment-36590554",
"name": "View Commit"
},
"description": "View this Commit on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>