anchordocking: resize after redock custom dock site

git-svn-id: trunk@26025 -
This commit is contained in:
mattias 2010-06-10 15:34:04 +00:00
parent 97c419e8ac
commit 3cf422d211

View File

@ -1939,18 +1939,34 @@ procedure TAnchorDockHostSite.RemoveControlFromLayout(AControl: TControl);
and (Parent.Parent=nil))
then begin
// shrink this site and the parent (which is a custom dock site)
NewParentBounds:=Parent.BoundsRect;
case Align of
alTop:
begin
NewParentBounds:=Parent.BoundsRect;
// ToDo Height:=OnlySiteLeft.Height;
Parent.BoundsRect:=NewParentBounds;
inc(NewParentBounds.Top,Height-OnlySiteLeft.Height);
Width:=Parent.ClientWidth;
Height:=OnlySiteLeft.Height;
end;
alBottom:
begin
dec(NewParentBounds.Bottom,Height-OnlySiteLeft.Height);
Width:=Parent.ClientWidth;
Height:=OnlySiteLeft.Height;
end;
alLeft:
begin
inc(NewParentBounds.Left,Width-OnlySiteLeft.Width);
Width:=OnlySiteLeft.Width;
Height:=Parent.ClientHeight;
end;
alRight:
begin
dec(NewParentBounds.Right,Width-OnlySiteLeft.Width);
Width:=OnlySiteLeft.Width;
Height:=Parent.ClientHeight;
end;
alBottom: ;
alLeft: ;
alRight: ;
end;
Parent.BoundsRect:=NewParentBounds;
end;
// change type