enter image description here
I am using Delphi 10.2 and macos sdk 10.13. I want the app to be filled with colour. How do I do it as on the example picture above?
I this code but not work prefectly:
unit Unit7;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs;
type
TForm7 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7: TForm7;
implementation
{$R *.fmx}
uses
Macapi.ObjectiveC, Macapi.CocoaTypes, Macapi.Foundation, Macapi.AppKit,
FMX.Platform, FMX.Platform.Mac;
type
TOCLocalAccess = class(TOCLocal);
function NSWindowOfForm(Form: TCommonCustomForm): NSWindow;
var
Obj: TMacWindowHandle;
begin
Result := (WindowHandleToPlatform(Form.Handle).Wnd);
end;
procedure TForm7.FormCreate(Sender: TObject);
begin
NSWindowOfForm(self).setStyleMask(NSNoTitle);
NSWindowOfForm(self).setOpaque(False);
NSWindowOfForm(self).setMovableByWindowBackground(true);
NSWindowOfForm(self).setBackgroundColor(TNscolor.Wrap(TNscolor.OCClass.colorWithCalibratedWhite(1.0, 0.5)));
end;
end.