mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 13:21:46 +02:00
uniteditor: make zones which can hook windows for docking smaller 2 times their actual size, more comments to code
git-svn-id: trunk@13906 -
This commit is contained in:
parent
543c7bfaab
commit
e612bb7cf1
@ -6237,13 +6237,16 @@ const
|
||||
procedure TSourceNotebook.DockPanelGetSiteInfo(Sender: TObject; DockClient: TControl;
|
||||
var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean);
|
||||
begin
|
||||
// accept only one control - docking in not ready for more
|
||||
CanDock := TWinControl(Sender).ControlCount = 0;
|
||||
|
||||
// make influence rect 2 times smaller that actual zone size
|
||||
if CanDock then
|
||||
case TWinControl(Sender).Align of
|
||||
alLeft: InfluenceRect.Right := InfluenceRect.Left + DockZoneSize;
|
||||
alTop: InfluenceRect.Bottom := InfluenceRect.Bottom + DockZoneSize;
|
||||
alRight: InfluenceRect.Left := InfluenceRect.Right - DockZoneSize;
|
||||
alBottom: InfluenceRect.Top := InfluenceRect.Top - DockZoneSize;
|
||||
alLeft: InfluenceRect.Right := InfluenceRect.Left + DockZoneSize div 2;
|
||||
alTop: InfluenceRect.Bottom := InfluenceRect.Bottom + DockZoneSize div 2;
|
||||
alRight: InfluenceRect.Left := InfluenceRect.Right - DockZoneSize div 2;
|
||||
alBottom: InfluenceRect.Top := InfluenceRect.Top - DockZoneSize div 2;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -6252,7 +6255,9 @@ procedure TSourceNotebook.DockPanelDockOver(Sender: TObject; Source: TDragDockOb
|
||||
var
|
||||
ARect: TRect;
|
||||
begin
|
||||
// accept only one control - docking in not ready for more
|
||||
Accept := TWinControl(Sender).ControlCount = 0;
|
||||
|
||||
if Accept then
|
||||
begin
|
||||
ARect := Source.DockRect;
|
||||
|
Loading…
Reference in New Issue
Block a user