cocoa: sending change bounds notification on direct setBounds call, to update LCL bounds (boundsrect and clientsrect) information. #33172

git-svn-id: trunk@57615 -
This commit is contained in:
dmitry 2018-04-07 03:12:05 +00:00
parent 535304ef18
commit ea840fc089

View File

@ -1472,6 +1472,8 @@ end;
class procedure TCocoaWSWinControl.SetBounds(const AWinControl: TWinControl; class procedure TCocoaWSWinControl.SetBounds(const AWinControl: TWinControl;
const ALeft, ATop, AWidth, AHeight: Integer); const ALeft, ATop, AWidth, AHeight: Integer);
var
cb : ICommonCallBack;
begin begin
if AWinControl.HandleAllocated then if AWinControl.HandleAllocated then
begin begin
@ -1480,6 +1482,9 @@ begin
[AWinControl.Name, dbgs(Bounds(ALeft, ATop, AWidth, AHeight))])); [AWinControl.Name, dbgs(Bounds(ALeft, ATop, AWidth, AHeight))]));
{$ENDIF} {$ENDIF}
NSObject(AWinControl.Handle).lclSetFrame(Bounds(ALeft, ATop, AWidth, AHeight)); NSObject(AWinControl.Handle).lclSetFrame(Bounds(ALeft, ATop, AWidth, AHeight));
cb := NSObject(AWinControl.Handle).lclGetCallback;
if Assigned(cb) then cb.boundsDidChange(nil);
end; end;
end; end;