From 13ce80945c4b028c670faa6775e249831ef9dedf Mon Sep 17 00:00:00 2001 From: dmitry Date: Sun, 3 Nov 2019 22:41:23 +0000 Subject: [PATCH] cocoa: forcing the constant scroll step git-svn-id: trunk@62183 - --- lcl/interfaces/cocoa/cocoawscommon.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoawscommon.pas b/lcl/interfaces/cocoa/cocoawscommon.pas index 1cd0fef00c..6a27b46408 100644 --- a/lcl/interfaces/cocoa/cocoawscommon.pas +++ b/lcl/interfaces/cocoa/cocoawscommon.pas @@ -1170,7 +1170,7 @@ begin if dy <> 0 then begin Msg.Msg := LM_MOUSEWHEEL; - Msg.WheelDelta := round(dy * WheelDeltaToLCLY); + Msg.WheelDelta := sign(dy) * LCLStep; end else if dx <> 0 then @@ -1179,7 +1179,7 @@ begin // see "deltaX" documentation. // on macOS: -1 = right, +1 = left // on LCL: -1 = left, +1 = right - Msg.WheelDelta := round(-dx * WheelDeltaToLCLX); + Msg.WheelDelta := sign(-dx) * LCLStep; end else // Filter out empty events - See bug 28491