[Lazarus] Proposal for TControl.DoDock patch

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 5 23:47:16 CEST 2010


On Mon, 5 Apr 2010 22:13:11 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

> 
> Hello,
> 
> After the recent AutoSize fixes of Mattias, easy docking with default LCL code is in sight.
> 
> I do propose the following fix for TControl.DoDock:
> 
> Change
> 
>      // adjust new bounds, so that they at least fit into the client area of
>      // its parent
>      LCLProc.MoveRectToFit(ARect, NewDockSite.GetLogicalClientRect)
> 
> To
>      // adjust new bounds, so that they at least fit into the client area of
>      // its parent
>      IF not NewDockSite.AutoSize then
>        LCLProc.MoveRectToFit(ARect, NewDockSite.GetLogicalClientRect)
>      else
>        ARect:=Rect(0,0,Width,Height);

Thanks. Applied.


Mattias




More information about the Lazarus mailing list