mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 15:31:09 +02:00
lcl: few docking changes by Hans-Peter Diettrich (part of issue #0013427)
git-svn-id: trunk@19436 -
This commit is contained in:
parent
a939a6214e
commit
dea006ff6b
@ -202,8 +202,7 @@ begin
|
||||
WinDragTarget := TWinControl(DragTarget);
|
||||
GetWindowRect(WinDragTarget.Handle, FDockRect);
|
||||
if (WinDragTarget.DockManager <> nil) then
|
||||
WinDragTarget.DockManager.PositionDockRect(Control, DropOnControl,
|
||||
DropAlign, FDockRect);
|
||||
WinDragTarget.DockManager.PositionDockRect(DragDockObject);
|
||||
end else
|
||||
begin
|
||||
with FDockRect do
|
||||
|
@ -421,7 +421,15 @@ begin
|
||||
|
||||
|
||||
if FDockObject.DragTarget <> nil then
|
||||
FDockObject.DragTargetPos := TControl(FDockObject.DragTarget).ScreenToClient(APosition);
|
||||
with FDockObject do
|
||||
begin //determine precise target now, before dmDragMove
|
||||
DragTargetPos := DragTarget.ScreenToClient(APosition);
|
||||
DropOnControl := GetDropControl;
|
||||
if DropOnControl = nil then
|
||||
DropAlign := FDockObject.DragTarget.GetDockEdge(DragTargetPos)
|
||||
else
|
||||
DropAlign := DropOnControl.GetDockEdge(DropOnControl.ScreenToClient(APosition));
|
||||
end;
|
||||
DragCursor := FDockObject.GetDragCursor(SendCmDragMsg(FDockObject, dmDragMove),APosition.X, APosition.Y);
|
||||
if FDragImageList <> nil then
|
||||
begin
|
||||
@ -442,17 +450,8 @@ begin
|
||||
//Draw borders for the docking section or the boundaries of the dragged form
|
||||
with FDockObject do
|
||||
begin
|
||||
if DragTarget = nil then
|
||||
FDockObject.Control.DockTrackNoTarget(TDragDockObject(FDockObject), APosition.X, APosition.Y)
|
||||
else
|
||||
begin
|
||||
DropOnControl := GetDropControl;
|
||||
if DropOnControl = nil then
|
||||
with FDockObject do
|
||||
DropAlign := DragTarget.GetDockEdge(DragTargetPos)
|
||||
else
|
||||
DropAlign := DropOnControl.GetDockEdge(DropOnControl.ScreenToClient(APosition));
|
||||
end;
|
||||
if DragTarget = nil then //show as floating
|
||||
FDockObject.Control.DockTrackNoTarget(FDockObject, APosition.X, APosition.Y);
|
||||
|
||||
MoveDockImage;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user