proj inspect, show btns for legacy native projs only when required

This commit is contained in:
Basile Burg 2018-03-16 23:22:29 +01:00
parent ddf8e9b0fa
commit 903c85c8f7
1 changed files with 7 additions and 5 deletions

View File

@ -87,6 +87,7 @@ implementation
{$R *.lfm} {$R *.lfm}
const optFname = 'projinspect.txt'; const optFname = 'projinspect.txt';
const filterAlign: array[boolean] of integer = (34, 142);
{$REGION Standard Comp/Obj------------------------------------------------------} {$REGION Standard Comp/Obj------------------------------------------------------}
constructor TCEProjectInspectWidget.create(aOwner: TComponent); constructor TCEProjectInspectWidget.create(aOwner: TComponent);
@ -158,7 +159,7 @@ begin
Tree.Images := fImages; Tree.Images := fImages;
Tree.PopupMenu := contextMenu; Tree.PopupMenu := contextMenu;
TreeFilterEdit1.BorderSpacing.Left := ScaleX(142, 96); TreeFilterEdit1.BorderSpacing.Left := ScaleX(filterAlign[false], 96);
fname := getCoeditDocPath + optFname; fname := getCoeditDocPath + optFname;
if fname.fileExists then if fname.fileExists then
@ -314,10 +315,11 @@ var
ce: boolean; ce: boolean;
begin begin
ce := fProject.getFormat = pfCE; ce := fProject.getFormat = pfCE;
btnRemFile.Enabled:= ce; btnRemFile.Visible:= ce;
btnRemFold.Enabled:= ce; btnRemFold.Visible:= ce;
btnAddFile.Enabled:= ce; btnAddFile.Visible:= ce;
btnAddFold.Enabled:= ce; btnAddFold.Visible:= ce;
TreeFilterEdit1.BorderSpacing.Left := ScaleX(filterAlign[ce], 96);
end; end;
procedure TCEProjectInspectWidget.setFileListAsTree(value: boolean); procedure TCEProjectInspectWidget.setFileListAsTree(value: boolean);