IDE/ProjectInspector: Hide project name and build mode in window title when docking. Issue #39418

This commit is contained in:
n7800 2024-12-25 09:33:24 +05:00 committed by Juha Manninen
parent 6e0c2e0095
commit 553af58124
2 changed files with 10 additions and 1 deletions

View File

@ -16,6 +16,7 @@ object ProjectInspectorForm: TProjectInspectorForm
OnDestroy = FormDestroy
OnDropFiles = FormDropFiles
OnResize = FormResize
OnShow = FormShow
object ItemsTreeView: TTreeView
Left = 0
Height = 261

View File

@ -149,6 +149,7 @@ type
procedure FormDestroy(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ItemsPopupMenuPopup(Sender: TObject);
procedure ItemsTreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; {%H-}State: TCustomDrawState; Stage: TCustomDrawStage;
@ -909,6 +910,11 @@ begin
PropsGroupBox.Constraints.MaxHeight := self.Height - FilterPanel.Height - ToolBar.Height - 20;
end;
procedure TProjectInspectorForm.FormShow(Sender: TObject);
begin
UpdateTitle; // update title on dock/undock
end;
procedure TProjectInspectorForm.ItemsPopupMenuPopup(Sender: TObject);
procedure SetItem(Item: TIDEMenuCommand; AnOnClick: TNotifyEvent;
@ -1802,7 +1808,9 @@ var
begin
if not CanUpdate(pefNeedUpdateTitle,Immediately) then exit;
Icon.Clear;
if LazProject=nil then
if (LazProject = nil) or
(assigned(HostDockSite) and assigned(HostDockSite.Parent)) // is docked
then
Caption:=lisMenuProjectInspector
else begin
NewCaption:=LazProject.GetTitle;