mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-02-25 07:48:46 +01:00
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:
parent
9351d428e7
commit
2a1e89b5ce
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user