ide: designer: let mediator decide the default size

This commit is contained in:
mattias 2024-10-09 11:26:05 +02:00
parent c74b232d9a
commit 15853ffffd

View File

@ -1316,7 +1316,7 @@ var
FreeMediator:=true;
end;
end;
if Mediator<>nil then
if (Mediator<>nil) and (ParentComponent=nil) then
begin
NewSize:=Mediator.GetDefaultSize;
if NewWidth=0 then
@ -1536,9 +1536,6 @@ begin
end
else begin
// non TControl
if CompWidth <= 0 then CompWidth := 50;
if CompHeight <= 0 then CompHeight := 50;
CompLeft := Max(Low(SmallInt), Min(High(SmallInt), CompLeft));
CompTop := Max(Low(SmallInt), Min(High(SmallInt), CompTop));
if Mediator=nil then