Cocoa: adjust the scope of Form Modern Style, macOS 11+ and independent windows

1. many APIs require macOS 10.15+, or even 11+
2. only applicable to independent windows, not Docked Form
This commit is contained in:
rich2014 2024-09-04 22:24:39 +08:00
parent 9351d428e7
commit 2a1e89b5ce

View File

@ -772,9 +772,13 @@ var
var
pFormConfig: PCocoaConfigForm;
begin
if NSAppKitVersionNumber < NSAppKitVersionNumber11_0 then
Exit;
pFormConfig:= TCocoaFormUtils.getConfigByName( AWinControl.Name );
if NOT Assigned(pFormConfig) then
Exit;
applyCocoaConfigTitleBar( pFormConfig^.titleBar );
applyCocoaConfigToolBar( pFormConfig^.toolBar );
end;
@ -867,6 +871,8 @@ begin
cnt.wincallback := TCocoaWindow(win).callback;
win.setContentView(cnt);
applyCocoaConfigForm;
win.makeFirstResponder(doc);
end
else
@ -906,8 +912,6 @@ begin
end;
doc.release;
applyCocoaConfigForm;
Result := TLCLHandle(cnt);
end;