Cocoa: Fix the issue that the ScrollBars of corresponding TScrollingWinControl were not updated correctly

This commit is contained in:
rich2014 2024-06-19 20:56:46 +08:00
parent eacd34023f
commit dfc1bbeec2

View File

@ -743,9 +743,10 @@ end;
procedure TCocoaScrollView.scrollWheel(theEvent: NSEvent);
begin
if self.hasHorizontalScroller or self.hasVerticalScroller then
inherited scrollWheel( theEvent )
else if Assigned(self.enclosingScrollView) then
if self.hasHorizontalScroller or self.hasVerticalScroller then begin
inherited scrollWheel( theEvent );
callback.scrollWheel( theEvent );
end else if Assigned(self.enclosingScrollView) then
self.enclosingScrollView.scrollWheel( theEvent )
else
inherited scrollWheel( theEvent );