mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
lcl: allow form dragging by client area only if it is docked into docksite without dock manager
git-svn-id: trunk@20070 -
This commit is contained in:
parent
6306629a9e
commit
e30c0905a2
@ -507,6 +507,7 @@ type
|
||||
procedure SetAutoSize(Value: Boolean); override;
|
||||
protected
|
||||
// drag and dock
|
||||
procedure BeginAutoDrag; override;
|
||||
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override;
|
||||
function GetFloating: Boolean; override;
|
||||
function GetDefaultDockCaption: String; override;
|
||||
|
@ -71,11 +71,6 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TControl.BeginAutoDrag;
|
||||
begin
|
||||
{ TODO -cdocking : Automatic drag-dock never should start immediately.
|
||||
A docked control should not try to undock itself, at least not immediately.
|
||||
A docked control also should stay docked until it is really dropped into a different location,
|
||||
so that a docking mangager can detect and handle (abort) an drop into the old place.
|
||||
}
|
||||
BeginDrag(DragManager.DragImmediate, DragManager.DragThreshold);
|
||||
end;
|
||||
|
||||
|
@ -1073,6 +1073,13 @@ begin
|
||||
inherited SetAutoSize(Value);
|
||||
end;
|
||||
|
||||
procedure TCustomForm.BeginAutoDrag;
|
||||
begin
|
||||
// allow form dragging only if it is docked into a site without DockManager
|
||||
if (HostDockSite <> nil) and not HostDockSite.UseDockManager then
|
||||
BeginDrag(False);
|
||||
end;
|
||||
|
||||
class function TCustomForm.GetControlClassDefaultSize: TPoint;
|
||||
begin
|
||||
Result.X:=320;
|
||||
|
Loading…
Reference in New Issue
Block a user