Skip to main content

Scaling issue on macOS 14 (Sonoma)

Using Delphi 11.3 (and probably earlier), apps on macOS 14 (Sonoma) may appear to have the wrong scale, depending on the screen resolution. This is an official workaround based on thisĀ Quality Portal report.

  1. Copy FMX.Platform.Mac.pas from the source\fmx folder and put it in the search path for your project, e.g., the same folder as the project, or add the unit directly to your project in project manager. (Remeber to remove the read-only attribute from the file before you start making any changes).
  2. Modify the TMacWindowHandle.GetScale method as follows:

    function TMacWindowHandle.GetScale: Single;
    begin
      if TOSVersion.Check(14) and not GlobalUseMetal then
        Result := 1
      else
        Result := Wnd.backingScaleFactor;
    end;