mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
User interface improvement for ProjectWizard dialog (shown after closing project).
git-svn-id: trunk@23749 -
This commit is contained in:
parent
2cac19afbe
commit
5867d5d8b4
@ -4314,8 +4314,7 @@ resourcestring
|
||||
// ProjectWizard Dialog
|
||||
lisPWNewProject = 'New Project';
|
||||
lisPWOpenProject = 'Open Project';
|
||||
lisPWRecentProjects = 'Recent Projects';
|
||||
lisPWOpenRecentProject = 'Open Recent';
|
||||
lisPWOpenRecentProject = 'Open Recent Project';
|
||||
lisPWConvertProject = 'Convert Delphi Project';
|
||||
lisInvalidCircle = 'Invalid circle';
|
||||
lisIsAThisCircleDependencyIsNotAllowed = '%s is a %s.%sThis circle '
|
||||
|
@ -1,28 +1,26 @@
|
||||
object ProjectWizardDialog: TProjectWizardDialog
|
||||
Left = 525
|
||||
Height = 250
|
||||
Top = 341
|
||||
Width = 300
|
||||
Left = 298
|
||||
Height = 294
|
||||
Top = 322
|
||||
Width = 382
|
||||
ActiveControl = btnNewProject
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Project Wizard '
|
||||
ClientHeight = 250
|
||||
ClientWidth = 300
|
||||
ClientHeight = 294
|
||||
ClientWidth = 382
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.27'
|
||||
LCLVersion = '0.9.29'
|
||||
object btnNewProject: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 7
|
||||
Width = 286
|
||||
Height = 25
|
||||
Top = 11
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 7
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'New Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
@ -30,18 +28,16 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnOpenProject: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = btnNewProject
|
||||
AnchorSideTop.Control = gbRecent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 37
|
||||
Width = 286
|
||||
Height = 25
|
||||
Top = 126
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 7
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Open Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
@ -49,18 +45,16 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnConvertProject: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = btnOpenRecent
|
||||
AnchorSideTop.Control = btnOpenProject
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 125
|
||||
Width = 286
|
||||
Height = 25
|
||||
Top = 162
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 7
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Convert Delphi Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
@ -68,60 +62,50 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
TabOrder = 2
|
||||
end
|
||||
object btnCloseIDE: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 220
|
||||
Width = 286
|
||||
Height = 25
|
||||
Top = 258
|
||||
Width = 368
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 7
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Close Lazarus'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnCloseIDEClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object cbRecentProjects: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = btnOpenProject
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 21
|
||||
Top = 67
|
||||
Width = 286
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Around = 7
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
TabOrder = 3
|
||||
Text = 'Recent Projects'
|
||||
end
|
||||
object btnOpenRecent: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cbRecentProjects
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
object gbRecent: TGroupBox
|
||||
AnchorSideTop.Control = btnNewProject
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 95
|
||||
Width = 286
|
||||
Height = 56
|
||||
Top = 53
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 7
|
||||
Caption = 'Open Recent'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnOpenRecentClick
|
||||
BorderSpacing.Top = 25
|
||||
BorderSpacing.Around = 17
|
||||
Caption = 'Open Recent Project'
|
||||
ClientHeight = 34
|
||||
ClientWidth = 358
|
||||
TabOrder = 4
|
||||
object cbRecentProjects: TComboBox
|
||||
AnchorSideLeft.Control = gbRecent
|
||||
AnchorSideTop.Control = gbRecent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbRecent
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 25
|
||||
Top = 7
|
||||
Width = 356
|
||||
Anchors = [akLeft, akRight]
|
||||
BorderSpacing.Around = 1
|
||||
ItemHeight = 0
|
||||
OnSelect = cbRecentProjectsSelect
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -46,14 +46,14 @@ type
|
||||
btnNewProject: TBitBtn;
|
||||
btnConvertProject: TBitBtn;
|
||||
btnCloseIDE: TBitBtn;
|
||||
btnOpenRecent: TBitBtn;
|
||||
btnOpenProject: TBitBtn;
|
||||
cbRecentProjects: TComboBox;
|
||||
gbRecent: TGroupBox;
|
||||
procedure btnCloseIDEClick(Sender: TObject);
|
||||
procedure btnConvertProjectClick(Sender: TObject);
|
||||
procedure btnNewProjectClick(Sender: TObject);
|
||||
procedure btnOpenProjectClick(Sender: TObject);
|
||||
procedure btnOpenRecentClick(Sender: TObject);
|
||||
procedure cbRecentProjectsSelect(Sender: TObject);
|
||||
private
|
||||
FResult: TProjectWizardSelectionType;
|
||||
public
|
||||
@ -66,8 +66,6 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TProjectWizardDialog }
|
||||
|
||||
function ShowProjectWizardDlg(out ARecentProject: String): TProjectWizardSelectionType;
|
||||
var
|
||||
ProjectWizardDialog: TProjectWizardDialog;
|
||||
@ -80,11 +78,11 @@ begin
|
||||
btnNewProject.caption:=lisPWNewProject;
|
||||
btnOpenProject.caption:=lisPWOpenProject;
|
||||
btnConvertProject.caption:=lisPWConvertProject;
|
||||
cbRecentProjects.text:=lisPWRecentProjects;
|
||||
btnOpenRecent.caption:=lisPWOpenRecentProject;
|
||||
gbRecent.Caption:=lisPWOpenRecentProject;
|
||||
btnCloseIDE.caption:=lisQuitLazarus;
|
||||
btnNewProject.LoadGlyphFromLazarusResource('item_project');
|
||||
btnOpenProject.LoadGlyphFromLazarusResource('menu_project_open');
|
||||
btnConvertProject.LoadGlyphFromLazarusResource('laz_wand');
|
||||
btnCloseIDE.LoadGlyphFromLazarusResource('menu_exit');
|
||||
cbRecentProjects.Items.AddStrings(EnvironmentOptions.RecentProjectFiles);
|
||||
end;
|
||||
@ -99,6 +97,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TProjectWizardDialog }
|
||||
|
||||
procedure TProjectWizardDialog.btnNewProjectClick(Sender: TObject);
|
||||
begin
|
||||
FResult := tpws_new;
|
||||
@ -119,9 +119,11 @@ begin
|
||||
FResult := tpws_open;
|
||||
end;
|
||||
|
||||
procedure TProjectWizardDialog.btnOpenRecentClick(Sender: TObject);
|
||||
procedure TProjectWizardDialog.cbRecentProjectsSelect(Sender: TObject);
|
||||
begin
|
||||
FResult := tpws_openRecent;
|
||||
if (Sender as TComboBox).Text<>'' then
|
||||
ModalResult:=mrOK; // Exit dialog if something is selected.
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user