From 15853ffffd89c580907ee7f8c65b23a773d87045 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 9 Oct 2024 11:26:05 +0200 Subject: [PATCH] ide: designer: let mediator decide the default size --- ide/customformeditor.pp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index f11d0d63da..492be680ba 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -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