IMO the gestures are designed for real touchscreens and not for touchpads. I believe this has never worked with touchpads.
Anyway, I have implemented a solution for myself by patching FMX.Platform.Mac, which was already patched anyway to work around the Sonoma scaling bug on MacOS. This is certainly not for everyone, but works like a charm. It uses the Angle parameter for an alternative zoom gesture (Angle is used in rotation gestures, for zoom it's always zero). Your app needs to respond to this accordingly. Most importantly, it doesn't break regular zoom gestures coming from real touch screens.
procedure TFMXViewBase.magnifyWithEvent(event: NSEvent);
var
...
begin
...
if FGestureControl <> nil then
begin
LTouches := event.touchesMatchingPhase(NSTouchPhaseTouching, NSView(Super));
if LTouches.count >= 2 then
begin
LTouchesArray := LTouches.allObjects;
LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(0));
LDeviceSize := LTouch.deviceSize;
FEventInfo.Distance := 0; //reset the distance
// Find the greatest distance between the touches.
for I := 0 to LTouches.count - 2 do
begin
LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(I));
LPoint := LTouch.normalizedPosition;
for J := 1 to LTouches.count - 1 do
begin
LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(J));
LPoint2 := LTouch.normalizedPosition;
Distance := Round(Sqrt(Sqr(LPoint.x * LDeviceSize.width - LPoint2.x * LDeviceSize.width) +
Sqr(LPoint.y * LDeviceSize.height - LPoint2.y * LDeviceSize.height)));
if Distance > FEventInfo.Distance then
FEventInfo.Distance := Distance;
end;
FEventInfo.GestureID := igiZoom;
if Supports(FGestureControl, IGestureControl, GestureObj) then
GestureObj.CMGesture(FEventInfo);
FEventInfo.Flags := [];
end
end
{ECS/ALEX}
else if LTouches.count = 0 then
begin
FEventInfo.Distance := 0;
FEventInfo.Angle := event.magnification;
FEventInfo.GestureID := igiZoom;
if Supports(FGestureControl, IGestureControl, GestureObj) then
GestureObj.CMGesture(FEventInfo);
FEventInfo.Flags := [];
end;
end
{ECS/ALEX}
else
//send the message up the responder chain
NSView(Super).magnifyWithEvent(event);
end;