cocoa: setting the default system font to a text edit on allocation

git-svn-id: trunk@62252 -
This commit is contained in:
dmitry 2019-11-17 06:02:30 +00:00
parent 968577d0f0
commit 45b2dae59f

View File

@ -409,6 +409,7 @@ begin
Result := TCocoaTextField.alloc.lclInitWithCreateParams(AParams);
if Assigned(Result) then
begin
Result.setFont(NSFont.systemFontOfSize(NSFont.systemFontSize));
Result.callback := TLCLCommonCallback.Create(Result, ATarget);
SetNSControlValue(Result, AParams.Caption);
end;
@ -419,6 +420,7 @@ begin
Result := TCocoaSecureTextField.alloc.lclInitWithCreateParams(AParams);
if Assigned(Result) then
begin
Result.setFont(NSFont.systemFontOfSize(NSFont.systemFontSize));
TCocoaSecureTextField(Result).callback := TLCLCommonCallback.Create(Result, ATarget);
SetNSText(Result.currentEditor, AParams.Caption);
end;