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
Result := Handle <> 0;
if Result then
begin
begin
if TCocoaWindowContent(handle).isembedded then
TCocoaWindowContent(handle).lclRelativePos(Left, Top)
else
begin
TCocoaWindowContent(handle).window.lclRelativePos(Left, Top);
end;
end
TCocoaWindowContent(handle).lclRelativePos(Left, Top)
else
TCocoaWindowContent(handle).window.lclRelativePos(Left, Top);
end
end;
function TCocoaWidgetSet.GetWindowSize(Handle: hwnd; var Width, Height: Integer): boolean;

View File

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