cocoa: fix formatting

git-svn-id: trunk@43649 -
This commit is contained in:
paul 2014-01-05 11:38:57 +00:00
parent 39872a9b0a
commit 06375fba9b
2 changed files with 20 additions and 22 deletions

View File

@ -925,14 +925,12 @@ function TCocoaWidgetSet.GetWindowRelativePosition(Handle: hwnd; var Left, Top:
begin begin
Result := Handle <> 0; Result := Handle <> 0;
if Result then if Result then
begin begin
if TCocoaWindowContent(handle).isembedded then if TCocoaWindowContent(handle).isembedded then
TCocoaWindowContent(handle).lclRelativePos(Left, Top) TCocoaWindowContent(handle).lclRelativePos(Left, Top)
else else
begin TCocoaWindowContent(handle).window.lclRelativePos(Left, Top);
TCocoaWindowContent(handle).window.lclRelativePos(Left, Top); end
end;
end
end; end;
function TCocoaWidgetSet.GetWindowSize(Handle: hwnd; var Width, Height: Integer): boolean; function TCocoaWidgetSet.GetWindowSize(Handle: hwnd; var Width, Height: Integer): boolean;

View File

@ -185,22 +185,22 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
class procedure TCocoaWSMenuItem.DestroyHandle(const AMenuItem: TMenuItem); class procedure TCocoaWSMenuItem.DestroyHandle(const AMenuItem: TMenuItem);
var var
callback: IMenuItemCallback; callback: IMenuItemCallback;
callbackObject: TObject; callbackObject: TObject;
item : TCocoaMenuItem; item: TCocoaMenuItem;
begin begin
if AMenuItem.Caption <> '-' then if AMenuItem.Caption <> '-' then
begin begin
item:=TCocoaMenuItem(AMenuItem.Handle); item := TCocoaMenuItem(AMenuItem.Handle);
callback := item.lclGetCallback; callback := item.lclGetCallback;
if Assigned(callback) then if Assigned(callback) then
begin begin
callbackObject := callback.GetCallbackObject; callbackObject := callback.GetCallbackObject;
callback := nil; callback := nil;
item.lclClearCallback; item.lclClearCallback;
callbackObject.Free; callbackObject.Free;
end; end;
end; end;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------