mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 05:09:13 +02:00
LCL: reduce overhead in CreateFloatingDockSite, TControl.DoFloatMsg: show the HostDockSite
git-svn-id: trunk@24908 -
This commit is contained in:
parent
c74a4777f3
commit
dbe8bd79b5
@ -556,7 +556,11 @@ begin
|
||||
FloatingClass:=FloatingDockSiteClass;
|
||||
if (FloatingClass<>nil) and (FloatingClass<>TWinControlClass(ClassType)) then
|
||||
begin
|
||||
Result := FloatingClass.Create(Application);
|
||||
Result := TWinControl(FloatingClass.NewInstance);
|
||||
{$IFNDEF OldAutoSize}
|
||||
Result.DisableAutoSizing;
|
||||
{$ENDIF}
|
||||
Result.Create(Application);
|
||||
// resize with minimal resizes
|
||||
NewClientWidth:=Bounds.Right-Bounds.Left;
|
||||
NewClientHeight:=Bounds.Bottom-Bounds.Top;
|
||||
@ -565,6 +569,9 @@ begin
|
||||
Result.SetBounds(Bounds.Left,Bounds.Top,NewWidth,NewHeight);
|
||||
Result.SetClientSize(Point(NewClientWidth,NewClientHeight));
|
||||
debugln('TControl.CreateFloatingDockSite A ',DbgSName(Self),' ',DbgSName(Result),' ',dbgs(Result.BoundsRect));
|
||||
{$IFNDEF OldAutoSize}
|
||||
Result.EnableAutoSizing;
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2854,6 +2861,7 @@ begin
|
||||
FloatHost.Caption := FloatHost.GetDockCaption(Self);
|
||||
ADockSource.DragTarget := FloatHost;
|
||||
end;
|
||||
FloatHost.Show;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -5365,7 +5365,7 @@ begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
inherited;
|
||||
inherited DoFloatMsg(ADockSource);
|
||||
end;
|
||||
|
||||
function TWinControl.GetDockCaption(AControl: TControl): String;
|
||||
|
Loading…
Reference in New Issue
Block a user