Cocoa: Fix the scrollWheel event processing logic on TCocoaScrollBar

This commit is contained in:
rich2014 2024-05-13 23:18:13 +08:00
parent 5a7f3952aa
commit dca0f86606

View File

@ -1062,11 +1062,10 @@ end;
procedure TCocoaScrollBar.scrollWheel(event: NSEvent); procedure TCocoaScrollBar.scrollWheel(event: NSEvent);
begin begin
if suppressLCLMouse then if Assigned(callback) then
inherited scrollWheel(event) callback.scrollWheel(event)
else else
if not Assigned(callback) or not callback.scrollWheel(event) then Inherited;
inherited scrollWheel(event);
end; end;
function TCocoaScrollBar.acceptsFirstResponder: LCLObjCBoolean; function TCocoaScrollBar.acceptsFirstResponder: LCLObjCBoolean;