Changeset 186 for Docking/CoolDocking/UCoolDockStyleRegions.pas
- Timestamp:
- Mar 10, 2011, 1:32:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockStyleRegions.pas
r185 r186 74 74 // FDockSite.ManualFloat(FDockSite.BoundsRect); 75 75 NewConjoinDockForm.ManualDock(NewDockSite); 76 AControl.ManualDock(NewConjoinDockForm .Panel, nil, InsertAt);76 AControl.ManualDock(NewConjoinDockForm, nil, InsertAt); 77 77 if DockSite is TForm then 78 DockSite.ManualDock(NewConjoinDockForm .Panel)78 DockSite.ManualDock(NewConjoinDockForm) 79 79 else 80 80 if DockSite is TPanel then 81 DockSite.Parent.ManualDock(NewConjoinDockForm .Panel);81 DockSite.Parent.ManualDock(NewConjoinDockForm); 82 82 UpdateClientSize; 83 83 Exit; … … 110 110 var 111 111 ClientPanel: TCoolDockClientPanel; 112 ClientCount: Integer; 112 113 begin 113 114 ClientPanel := TCoolDockManager(Manager).FindControlInPanels(Control); … … 115 116 116 117 TCoolDockManager(Manager).DockPanels.Remove(ClientPanel); 118 ClientCount := TCoolDockManager(Manager).DockPanels.Count; 117 119 118 120 //if TCoolDockManager(Manager).DockSite.DockClientCount = 2 then FDockDirection := ddNone; 119 if TCoolDockManager(Manager).DockPanels.Count = 1 then begin121 if ClientCount = 1 then begin 120 122 // Last removed control => Free parent if it is TCoolDockConjoinForm 121 if TCoolDockManager(Manager).DockSite .Parentis TCoolDockConjoinForm then122 with TCoolDockConjoinForm(TCoolDockManager(Manager).DockSite .Parent) do begin123 if TCoolDockManager(Manager).DockSite is TCoolDockConjoinForm then 124 with TCoolDockConjoinForm(TCoolDockManager(Manager).DockSite) do begin 123 125 if Assigned(Parent) then begin 124 126 TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[0]).Control.ManualDock(HostDockSite); … … 129 131 end; 130 132 inherited RemoveControl(Control); 133 if ClientCount > 1 then UpdateClientSize; 131 134 end; 132 135 … … 191 194 else Align := alClient; 192 195 196 Inc(SplitterLeft, Width); 197 Inc(SplitterTop, Height); 193 198 Splitter.Left := SplitterLeft; 194 199 Splitter.Top := SplitterTop; 195 Inc(SplitterLeft, Width);196 Inc(SplitterTop, Height);197 200 Splitter.Parent := TCoolDockManager(Manager).DockSite; 198 201 Splitter.Align := BaseAlign; 199 202 Splitter.Visible := I < (DockPanels.Count - 1); 200 203 Inc(SplitterLeft, Splitter.Width); 204 Inc(SplitterTop, Splitter.Height); 201 205 202 206 DockPanelPaint(Self);
Note:
See TracChangeset
for help on using the changeset viewer.