mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 17:17:52 +02:00
IDE/ProjectInspector: Add a button to the toolbar to show/hide the properties panel
This commit is contained in:
parent
0b7d81bd37
commit
3f57047f77
@ -2770,6 +2770,7 @@ resourcestring
|
||||
lisPLDOnlinePackagesCannotBeDeleted = 'Online packages cannot be deleted';
|
||||
lisPESortFilesAlphabetically = 'Sort files alphabetically';
|
||||
lisPEShowDirectoryHierarchy = 'Show directory hierarchy';
|
||||
lisPEShowPropsPanel = 'Show properties panel';
|
||||
lisClearFilter = 'Clear filter';
|
||||
dlgCaseSensitive = '&Case sensitive';
|
||||
lisDistinguishBigAndSmallLettersEGAAndA = 'Distinguish big and small letters e.g. A and a';
|
||||
|
@ -105,14 +105,14 @@ object ProjectInspectorForm: TProjectInspectorForm
|
||||
OnClick = SortAlphabeticallyButtonClick
|
||||
end
|
||||
object FilterEdit: TTreeFilterEdit
|
||||
AnchorSideLeft.Control = SortAlphabeticallyButton
|
||||
AnchorSideLeft.Control = ShowPropsPanelButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SortAlphabeticallyButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 95
|
||||
Left = 122
|
||||
Height = 23
|
||||
Top = 3
|
||||
Width = 365
|
||||
Width = 338
|
||||
OnAfterFilter = FilterEditAfterFilter
|
||||
ButtonWidth = 23
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -124,6 +124,25 @@ object ProjectInspectorForm: TProjectInspectorForm
|
||||
OnKeyDown = FilterEditKeyDown
|
||||
FilteredTreeview = ItemsTreeView
|
||||
end
|
||||
object ShowPropsPanelButton: TSpeedButton
|
||||
AnchorSideLeft.Control = SortAlphabeticallyButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = OpenButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 94
|
||||
Height = 25
|
||||
Top = 2
|
||||
Width = 25
|
||||
AllowAllUp = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 2
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 25
|
||||
GroupIndex = 2
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
OnClick = ShowPropsPanelButtonClick
|
||||
end
|
||||
end
|
||||
object ToolBar: TToolBar
|
||||
Left = 0
|
||||
|
@ -129,6 +129,7 @@ type
|
||||
ItemsTreeView: TTreeView;
|
||||
ItemsPopupMenu: TPopupMenu;
|
||||
SortAlphabeticallyButton: TSpeedButton;
|
||||
ShowPropsPanelButton: TSpeedButton;
|
||||
Splitter1: TSplitter;
|
||||
// toolbar
|
||||
ToolBar: TToolBar;
|
||||
@ -174,6 +175,7 @@ type
|
||||
procedure ReAddMenuItemClick(Sender: TObject);
|
||||
procedure RemoveBitBtnClick(Sender: TObject);
|
||||
procedure RemoveNonExistingFilesMenuItemClick(Sender: TObject);
|
||||
procedure ShowPropsPanelButtonClick(Sender: TObject);
|
||||
procedure SortAlphabeticallyButtonClick(Sender: TObject);
|
||||
procedure EnableI18NForLFMMenuItemClick(Sender: TObject);
|
||||
procedure DisableI18NForLFMMenuItemClick(Sender: TObject);
|
||||
@ -1207,6 +1209,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.ShowPropsPanelButtonClick(Sender: TObject);
|
||||
begin
|
||||
with EnvironmentGuiOpts.Desktop do
|
||||
ProjectInspectorShowProps := not ProjectInspectorShowProps;
|
||||
OptionsChanged(Sender, false);
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.SelectFileNode(const AFileName: string);
|
||||
function _FindInChildren(_Parent: TTreeNode): TTreeNode;
|
||||
var
|
||||
@ -1392,6 +1401,7 @@ end;
|
||||
procedure TProjectInspectorForm.OptionsChanged(Sender: TObject; Restore: boolean);
|
||||
begin
|
||||
PropsGroupBox.Visible := EnvironmentGuiOpts.Desktop.ProjectInspectorShowProps;
|
||||
ShowPropsPanelButton.Down := PropsGroupBox.Visible;
|
||||
PropsGroupBox.Height := EnvironmentGuiOpts.Desktop.ProjectInspectorPropsPanelHeight;
|
||||
Splitter1.Visible := PropsGroupBox.Visible;
|
||||
end;
|
||||
@ -1428,6 +1438,8 @@ begin
|
||||
IDEImages.AssignImage(SortAlphabeticallyButton, 'pkg_sortalphabetically');
|
||||
DirectoryHierarchyButton.Hint:=lisPEShowDirectoryHierarchy;
|
||||
IDEImages.AssignImage(DirectoryHierarchyButton, 'pkg_hierarchical');
|
||||
ShowPropsPanelButton.Hint:=lisPEShowPropsPanel;
|
||||
IDEImages.AssignImage(ShowPropsPanelButton, 'item_todo');
|
||||
|
||||
FPropGui.OnGetPkgDep := @GetDependencyToUpdate;
|
||||
FPropGui.ApplyDependencyButton.OnClick := @ApplyDependencyButtonClick;
|
||||
|
Loading…
Reference in New Issue
Block a user