Merge branch 'IDE/PjInsp/PropPanelLimit' into 'main'

IDE/ProjectInspector: Limit the height of the properties panel

See merge request freepascal.org/lazarus/lazarus!395
This commit is contained in:
Juha Manninen 2024-12-03 20:58:08 +00:00
commit 9b726c777f
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,7 @@ object ProjectInspectorForm: TProjectInspectorForm
OnDeactivate = FormDeactivate
OnDestroy = FormDestroy
OnDropFiles = FormDropFiles
OnResize = FormResize
object ItemsTreeView: TTreeView
Left = 0
Height = 261
@ -162,6 +163,7 @@ object ProjectInspectorForm: TProjectInspectorForm
Width = 463
Align = alBottom
Caption = 'PropsGroupBox'
Constraints.MinHeight = 20
TabOrder = 3
OnResize = PropsGroupBoxResize
end

View File

@ -148,6 +148,7 @@ type
procedure FormDeactivate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
procedure FormResize(Sender: TObject);
procedure ItemsPopupMenuPopup(Sender: TObject);
procedure ItemsTreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; {%H-}State: TCustomDrawState; Stage: TCustomDrawStage;
@ -903,6 +904,11 @@ begin
end;
end;
procedure TProjectInspectorForm.FormResize(Sender: TObject);
begin
PropsGroupBox.Constraints.MaxHeight := self.Height - FilterPanel.Height - ToolBar.Height - 20;
end;
procedure TProjectInspectorForm.ItemsPopupMenuPopup(Sender: TObject);
procedure SetItem(Item: TIDEMenuCommand; AnOnClick: TNotifyEvent;