Smooth scrolling
Trevor DeVore
lists at mangomultimedia.com
Fri Feb 5 16:57:42 EST 2021
On Fri, Feb 5, 2021 at 4:10 AM Niggemann, Bernd via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Thank you Trevor for making this available. After testing your library i
> realize what an improvement it is.
> And I agree that "ideally any engine improvents would tap into the scroll
> wheel values provided by the OS"
>
> I don't see any difference regarding lineSize. Maybe
> "ObjC_NSEventHasPreciseScrollingDeltas" is true.
> Anyway in the comments of the LCB file you mention "row height"
> Do you mean "effectiv lineSize" (synonym of borderSize) or "effective
> textHeight"?
>
Hi Bernd,
Glad you like it. I originally wrote the extension for use with the
DataView (a more modern DataGrid) which has a "row" concept rather than a
"line" concept. I hadn't applied it to fields before putting together the
test yesterday. You are correct, if should be `textHeight`, not `lineSize`,
in the script.
> I added hScroll to your script (again this is Mac only and needs Trevor's
> library installed)
>
> -------------------------------------------
> on rawKeyDown pKey
> -- if the optionKey is down then pass rawKeyDown -- just to test
> scrolling of LC and library
> if pKey = "65308" or pKey = "65309" then
> set the vscroll of me to the vscroll of me \
> - item 2 of macCurrentEventScrollValues(the effective linesize of
> me)
> else if pKey is in "65310,65311" and the hScrollbar of me then
> set the hscroll of me to the hscroll of me \
> - item 1 of macCurrentEventScrollValues(the effective linesize of me)
> else
> pass rawKeyDown
> end if
> end rawKeyDown
> --------------------------------------------
>
Nice addition!
--
Trevor DeVore
ScreenSteps
www.screensteps.com
More information about the use-livecode
mailing list