AnchorDockingDsgn: Set FloatingWindowsOnTop per default in new created IDE. See issue #19272

git-svn-id: trunk@65062 -
This commit is contained in:
michl 2021-04-25 15:58:56 +00:00
parent a21a6484f6
commit 1581009347
6 changed files with 64 additions and 49 deletions

View File

@ -1,51 +1,52 @@
LazarusResources.Add('ADLayoutDefault','XML',[
'<?xml version="1.0"?>'#13#10'<CONFIG>'#13#10' <MainConfig>'#13#10' <Node'
+'s ChildCount="1">'#13#10' <Item1 Name="MainIDE" Type="CustomSite" Chil'
+'dCount="1">'#13#10' <Bounds Width="1024" Height="768">'#13#10' '
+' <WorkArea>'#13#10' <Rect Right="1920" Bottom="1036"/>'#13#10
+' </WorkArea>'#13#10' </Bounds>'#13#10' <Item1 Name="'
+'AnchorDockSite10" Type="Layout" ChildCount="7">'#13#10' <Bounds To'
+'p="60" Width="1024" Height="688" SplitterPos="58"/>'#13#10' <Ancho'
+'rs Align="Bottom"/>'#13#10' <Item1 Name="SourceNotebook" Type="Con'
+'trol">'#13#10' <Bounds Left="177" Width="651" Height="505"/>'#13
+#10' <Anchors Left="AnchorDockSplitter4" Right="AnchorDockSplitte'
+'r3" Bottom="AnchorDockSplitter2"/>'#13#10' <Header Position="lef'
+'t"/>'#13#10' </Item1>'#13#10' <Item2 Name="AnchorDockSpli'
+'tter2" Type="SplitterHorizontal">'#13#10' <Bounds Left="177" Top'
+'="505" Width="651" Height="7"/>'#13#10' <Anchors Left="AnchorDoc'
+'kSplitter4" Right="AnchorDockSplitter3"/>'#13#10' </Item2>'#13#10
+' <Item3 Name="AnchorDockSite11" Type="Pages" ChildCount="5">'#13#10
+' <Bounds Left="177" Top="512" Width="651" Height="176"/>'#13#10
+' <Anchors Left="AnchorDockSplitter4" Top="AnchorDockSplitter2" R'
+'ight="AnchorDockSplitter3"/>'#13#10' <Item1 Name="MessagesView" '
+'Type="Control">'#13#10' <Bounds Width="643" Height="150"/>'#13
+#10' <Anchors Align="Client"/>'#13#10' </Item1>'#13
+#10' <Item2 Name="Watches" Type="Control">'#13#10' <'
+'Bounds Width="932" Height="119"/>'#13#10' <Anchors Align="Clie'
+'nt"/>'#13#10' </Item2>'#13#10' <Item3 Name="SearchRes'
+'ults" Type="Control">'#13#10' <Bounds Width="932" Height="119"'
+'/>'#13#10' <Anchors Align="Client"/>'#13#10' </Item'
+'3>'#13#10' <Item4 Name="Assembler" Type="Control">'#13#10' '
+' <Bounds Width="932" Height="106"/>'#13#10' <Anchors Al'
+'ign="Client"/>'#13#10' </Item4>'#13#10' <Item5 Name="'
+'BreakPoints" Type="Control">'#13#10' <Bounds Width="937" Heigh'
+'t="106"/>'#13#10' <Anchors Align="Client"/>'#13#10' '
+' </Item5>'#13#10' </Item3>'#13#10' <Item4 Name="AnchorDoc'
+'kSplitter3" Type="SplitterVertical">'#13#10' <Bounds Left="828" '
+'Width="9" Height="688"/>'#13#10' </Item4>'#13#10' <Item5 '
+'Name="AnchorDockSite12" Type="Pages" ChildCount="2">'#13#10' <Bo'
+'unds Left="837" Width="187" Height="688"/>'#13#10' <Anchors Left'
+'="AnchorDockSplitter3"/>'#13#10' <Item1 Name="CodeExplorerView" '
+'Type="Control">'#13#10' <Bounds Width="179" Height="662"/>'#13
+#10' <Anchors Align="Client"/>'#13#10' </Item1>'#13
+#10' <Item2 Name="ComponentList" Type="Control">'#13#10' '
+' <Bounds Width="159" Height="626"/>'#13#10' <Anchors Align'
+'="Client"/>'#13#10' </Item2>'#13#10' </Item5>'#13#10' '
+' <Item6 Name="ObjectInspectorDlg" Type="Control">'#13#10' '
+' <Bounds Width="173" Height="688"/>'#13#10' <Anchors Right="Anch'
+'orDockSplitter4"/>'#13#10' </Item6>'#13#10' <Item7 Name="'
+'AnchorDockSplitter4" Type="SplitterVertical">'#13#10' <Bounds Le'
+'ft="173" Width="4" Height="688"/>'#13#10' </Item7>'#13#10' '
+'</Item1>'#13#10' </Item1>'#13#10' </Nodes>'#13#10' </MainConfig>'
'<?xml version="1.0"?>'#13#10'<CONFIG>'#13#10' <Version Value="1"/>'#13#10' '
+' <MainConfig>'#13#10' <Nodes ChildCount="1">'#13#10' <Item1 Name="M'
+'ainIDE" Type="CustomSite" ChildCount="1">'#13#10' <Bounds Width="102'
+'4" Height="768">'#13#10' <WorkArea>'#13#10' <Rect Right'
+'="1920" Bottom="1036"/>'#13#10' </WorkArea>'#13#10' </Bound'
+'s>'#13#10' <Item1 Name="AnchorDockSite10" Type="Layout" ChildCount="'
+'7">'#13#10' <Bounds Top="60" Width="1024" Height="688" SplitterPos'
+'="58"/>'#13#10' <Anchors Align="Bottom"/>'#13#10' <Item1 '
+'Name="SourceNotebook" Type="Control">'#13#10' <Bounds Left="177"'
+' Width="651" Height="505"/>'#13#10' <Anchors Left="AnchorDockSpl'
+'itter4" Right="AnchorDockSplitter3" Bottom="AnchorDockSplitter2"/>'#13#10' '
+' <Header Position="left"/>'#13#10' </Item1>'#13#10' '
+' <Item2 Name="AnchorDockSplitter2" Type="SplitterHorizontal">'#13#10' '
+' <Bounds Left="177" Top="505" Width="651" Height="7"/>'#13#10' '
+' <Anchors Left="AnchorDockSplitter4" Right="AnchorDockSplitter3"/>'
+#13#10' </Item2>'#13#10' <Item3 Name="AnchorDockSite11" Ty'
+'pe="Pages" ChildCount="5">'#13#10' <Bounds Left="177" Top="512" '
+'Width="651" Height="176"/>'#13#10' <Anchors Left="AnchorDockSpli'
+'tter4" Top="AnchorDockSplitter2" Right="AnchorDockSplitter3"/>'#13#10' '
+' <Item1 Name="MessagesView" Type="Control">'#13#10' <Bou'
+'nds Width="643" Height="150"/>'#13#10' <Anchors Align="Client"'
+'/>'#13#10' </Item1>'#13#10' <Item2 Name="Watches" Typ'
+'e="Control">'#13#10' <Bounds Width="932" Height="119"/>'#13#10
+' <Anchors Align="Client"/>'#13#10' </Item2>'#13#10
+' <Item3 Name="SearchResults" Type="Control">'#13#10' '
+' <Bounds Width="932" Height="119"/>'#13#10' <Anchors Align="C'
+'lient"/>'#13#10' </Item3>'#13#10' <Item4 Name="Assemb'
+'ler" Type="Control">'#13#10' <Bounds Width="932" Height="106"/'
+'>'#13#10' <Anchors Align="Client"/>'#13#10' </Item4'
+'>'#13#10' <Item5 Name="BreakPoints" Type="Control">'#13#10' '
+' <Bounds Width="937" Height="106"/>'#13#10' <Anchors A'
+'lign="Client"/>'#13#10' </Item5>'#13#10' </Item3>'#13#10
+' <Item4 Name="AnchorDockSplitter3" Type="SplitterVertical">'#13#10
+' <Bounds Left="828" Width="9" Height="688"/>'#13#10' </'
+'Item4>'#13#10' <Item5 Name="AnchorDockSite12" Type="Pages" ChildCo'
+'unt="2">'#13#10' <Bounds Left="837" Width="187" Height="688"/>'
+#13#10' <Anchors Left="AnchorDockSplitter3"/>'#13#10' '
+'<Item1 Name="CodeExplorerView" Type="Control">'#13#10' <Bounds'
+' Width="179" Height="662"/>'#13#10' <Anchors Align="Client"/>'
+#13#10' </Item1>'#13#10' <Item2 Name="ComponentList" T'
+'ype="Control">'#13#10' <Bounds Width="159" Height="626"/>'#13
+#10' <Anchors Align="Client"/>'#13#10' </Item2>'#13
+#10' </Item5>'#13#10' <Item6 Name="ObjectInspectorDlg" Typ'
+'e="Control">'#13#10' <Bounds Width="173" Height="688"/>'#13#10' '
+' <Anchors Right="AnchorDockSplitter4"/>'#13#10' </Item6>'
+#13#10' <Item7 Name="AnchorDockSplitter4" Type="SplitterVertical">'
+#13#10' <Bounds Left="173" Width="4" Height="688"/>'#13#10' '
+' </Item7>'#13#10' </Item1>'#13#10' </Item1>'#13#10' </Nod'
+'es>'#13#10' </MainConfig>'#13#10' <Settings FloatingWindowsOnTop="True"/>'
+#13#10'</CONFIG>'#13#10
]);

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?>
<CONFIG>
<Version Value="1"/>
<MainConfig>
<Nodes ChildCount="1">
<Item1 Name="MainIDE" Type="CustomSite" ChildCount="1">
@ -70,4 +71,5 @@
</Item1>
</Nodes>
</MainConfig>
<Settings FloatingWindowsOnTop="True"/>
</CONFIG>

View File

@ -134,8 +134,8 @@ end;
procedure TAnchorDesktopOpt.LoadDefaults;
begin
LoadDefaultLayout;
LoadLegacyAnchorDockOptions;
LoadDefaultLayout;
end;
procedure TAnchorDesktopOpt.ImportSettingsFromIDE;

View File

@ -83,6 +83,7 @@ type
const AAdjustHeight: Boolean; const ANewHeight: Integer); override;
procedure CloseAll; override;
procedure ResetSplitters; override;
procedure SetMainDockWindow(AForm: TCustomForm); override;
end;
{ TAnchorDockIDEFrame }
@ -237,6 +238,14 @@ begin
DockMaster.ResetSplitters;
end;
procedure TIDEAnchorDockMaster.SetMainDockWindow(AForm: TCustomForm);
begin
{$IFDEF VerboseAnchorDocking}
debugln(['TIDEAnchorDockMaster.SetMainDockWindow ',DbgSName(AForm)]);
{$ENDIF}
DockMaster.MainDockForm := AForm;
end;
procedure TIDEAnchorDockMaster.MakeIDEWindowDockable(AControl: TWinControl);
begin
{$IFDEF VerboseAnchorDocking}

View File

@ -446,6 +446,7 @@ type
procedure CloseAll; virtual; // close all forms, called after IDE has saved all and shuts down
procedure ResetSplitters; virtual; abstract; // if the dock site has been resized after loading, you have to reset (percentual) splitters
function DockedDesktopOptClass: TAbstractDesktopDockingOptClass; virtual; abstract;
procedure SetMainDockWindow(AForm: TCustomForm); virtual; abstract;
end;
TIDEWindowGlobalOption = class

View File

@ -623,6 +623,8 @@ begin
AllowDropFiles:=true;
Scaled:=true;
OnDropFiles:=@MainIDEBarDropFiles;
if Assigned(IDEDockMaster) then
IDEDockMaster.SetMainDockWindow(Self);
{$IFNDEF LCLGtk2}
try
Icon.LoadFromResourceName(HInstance, 'WIN_MAIN');