mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:59:12 +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';
|
lisPLDOnlinePackagesCannotBeDeleted = 'Online packages cannot be deleted';
|
||||||
lisPESortFilesAlphabetically = 'Sort files alphabetically';
|
lisPESortFilesAlphabetically = 'Sort files alphabetically';
|
||||||
lisPEShowDirectoryHierarchy = 'Show directory hierarchy';
|
lisPEShowDirectoryHierarchy = 'Show directory hierarchy';
|
||||||
|
lisPEShowPropsPanel = 'Show properties panel';
|
||||||
lisClearFilter = 'Clear filter';
|
lisClearFilter = 'Clear filter';
|
||||||
dlgCaseSensitive = '&Case sensitive';
|
dlgCaseSensitive = '&Case sensitive';
|
||||||
lisDistinguishBigAndSmallLettersEGAAndA = 'Distinguish big and small letters e.g. A and a';
|
lisDistinguishBigAndSmallLettersEGAAndA = 'Distinguish big and small letters e.g. A and a';
|
||||||
|
@ -105,14 +105,14 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
OnClick = SortAlphabeticallyButtonClick
|
OnClick = SortAlphabeticallyButtonClick
|
||||||
end
|
end
|
||||||
object FilterEdit: TTreeFilterEdit
|
object FilterEdit: TTreeFilterEdit
|
||||||
AnchorSideLeft.Control = SortAlphabeticallyButton
|
AnchorSideLeft.Control = ShowPropsPanelButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = SortAlphabeticallyButton
|
AnchorSideTop.Control = SortAlphabeticallyButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 95
|
Left = 122
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 365
|
Width = 338
|
||||||
OnAfterFilter = FilterEditAfterFilter
|
OnAfterFilter = FilterEditAfterFilter
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -124,6 +124,25 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
OnKeyDown = FilterEditKeyDown
|
OnKeyDown = FilterEditKeyDown
|
||||||
FilteredTreeview = ItemsTreeView
|
FilteredTreeview = ItemsTreeView
|
||||||
end
|
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
|
end
|
||||||
object ToolBar: TToolBar
|
object ToolBar: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
|
@ -129,6 +129,7 @@ type
|
|||||||
ItemsTreeView: TTreeView;
|
ItemsTreeView: TTreeView;
|
||||||
ItemsPopupMenu: TPopupMenu;
|
ItemsPopupMenu: TPopupMenu;
|
||||||
SortAlphabeticallyButton: TSpeedButton;
|
SortAlphabeticallyButton: TSpeedButton;
|
||||||
|
ShowPropsPanelButton: TSpeedButton;
|
||||||
Splitter1: TSplitter;
|
Splitter1: TSplitter;
|
||||||
// toolbar
|
// toolbar
|
||||||
ToolBar: TToolBar;
|
ToolBar: TToolBar;
|
||||||
@ -174,6 +175,7 @@ type
|
|||||||
procedure ReAddMenuItemClick(Sender: TObject);
|
procedure ReAddMenuItemClick(Sender: TObject);
|
||||||
procedure RemoveBitBtnClick(Sender: TObject);
|
procedure RemoveBitBtnClick(Sender: TObject);
|
||||||
procedure RemoveNonExistingFilesMenuItemClick(Sender: TObject);
|
procedure RemoveNonExistingFilesMenuItemClick(Sender: TObject);
|
||||||
|
procedure ShowPropsPanelButtonClick(Sender: TObject);
|
||||||
procedure SortAlphabeticallyButtonClick(Sender: TObject);
|
procedure SortAlphabeticallyButtonClick(Sender: TObject);
|
||||||
procedure EnableI18NForLFMMenuItemClick(Sender: TObject);
|
procedure EnableI18NForLFMMenuItemClick(Sender: TObject);
|
||||||
procedure DisableI18NForLFMMenuItemClick(Sender: TObject);
|
procedure DisableI18NForLFMMenuItemClick(Sender: TObject);
|
||||||
@ -1207,6 +1209,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
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);
|
procedure TProjectInspectorForm.SelectFileNode(const AFileName: string);
|
||||||
function _FindInChildren(_Parent: TTreeNode): TTreeNode;
|
function _FindInChildren(_Parent: TTreeNode): TTreeNode;
|
||||||
var
|
var
|
||||||
@ -1392,6 +1401,7 @@ end;
|
|||||||
procedure TProjectInspectorForm.OptionsChanged(Sender: TObject; Restore: boolean);
|
procedure TProjectInspectorForm.OptionsChanged(Sender: TObject; Restore: boolean);
|
||||||
begin
|
begin
|
||||||
PropsGroupBox.Visible := EnvironmentGuiOpts.Desktop.ProjectInspectorShowProps;
|
PropsGroupBox.Visible := EnvironmentGuiOpts.Desktop.ProjectInspectorShowProps;
|
||||||
|
ShowPropsPanelButton.Down := PropsGroupBox.Visible;
|
||||||
PropsGroupBox.Height := EnvironmentGuiOpts.Desktop.ProjectInspectorPropsPanelHeight;
|
PropsGroupBox.Height := EnvironmentGuiOpts.Desktop.ProjectInspectorPropsPanelHeight;
|
||||||
Splitter1.Visible := PropsGroupBox.Visible;
|
Splitter1.Visible := PropsGroupBox.Visible;
|
||||||
end;
|
end;
|
||||||
@ -1428,6 +1438,8 @@ begin
|
|||||||
IDEImages.AssignImage(SortAlphabeticallyButton, 'pkg_sortalphabetically');
|
IDEImages.AssignImage(SortAlphabeticallyButton, 'pkg_sortalphabetically');
|
||||||
DirectoryHierarchyButton.Hint:=lisPEShowDirectoryHierarchy;
|
DirectoryHierarchyButton.Hint:=lisPEShowDirectoryHierarchy;
|
||||||
IDEImages.AssignImage(DirectoryHierarchyButton, 'pkg_hierarchical');
|
IDEImages.AssignImage(DirectoryHierarchyButton, 'pkg_hierarchical');
|
||||||
|
ShowPropsPanelButton.Hint:=lisPEShowPropsPanel;
|
||||||
|
IDEImages.AssignImage(ShowPropsPanelButton, 'item_todo');
|
||||||
|
|
||||||
FPropGui.OnGetPkgDep := @GetDependencyToUpdate;
|
FPropGui.OnGetPkgDep := @GetDependencyToUpdate;
|
||||||
FPropGui.ApplyDependencyButton.OnClick := @ApplyDependencyButtonClick;
|
FPropGui.ApplyDependencyButton.OnClick := @ApplyDependencyButtonClick;
|
||||||
|
Loading…
Reference in New Issue
Block a user