IDE: Improving "Directives for new unit" dialog layout. Issue #20067

git-svn-id: trunk@32085 -
This commit is contained in:
juha 2011-08-28 14:36:23 +00:00
parent 6815af3213
commit 90e54bf90d
2 changed files with 38 additions and 38 deletions

View File

@ -1,21 +1,20 @@
object CheckCompOptsForNewUnitDialog: TCheckCompOptsForNewUnitDialog
Left = 272
Height = 243
Top = 255
Left = 305
Height = 225
Top = 254
Width = 434
Caption = 'CheckCompOptsForNewUnitDialog'
ClientHeight = 243
ClientHeight = 225
ClientWidth = 434
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.29'
LCLVersion = '0.9.31'
object NoteLabel: TLabel
Left = 6
Height = 94
Height = 16
Top = 6
Width = 422
Align = alTop
AutoSize = False
BorderSpacing.Around = 6
Caption = 'NoteLabel'
ParentColor = False
@ -26,9 +25,9 @@ object CheckCompOptsForNewUnitDialog: TCheckCompOptsForNewUnitDialog
AnchorSideTop.Control = ModeComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 110
Width = 78
Height = 16
Top = 36
Width = 68
BorderSpacing.Left = 6
Caption = 'ModeLabel'
ParentColor = False
@ -38,11 +37,12 @@ object CheckCompOptsForNewUnitDialog: TCheckCompOptsForNewUnitDialog
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = NoteLabel
AnchorSideTop.Side = asrBottom
Left = 90
Height = 27
Top = 106
Left = 80
Height = 23
Top = 33
Width = 135
BorderSpacing.Left = 6
BorderSpacing.Top = 11
ItemHeight = 0
TabOrder = 0
Text = 'ModeComboBox'
@ -52,9 +52,9 @@ object CheckCompOptsForNewUnitDialog: TCheckCompOptsForNewUnitDialog
AnchorSideTop.Control = ModeComboBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 139
Width = 165
Height = 26
Top = 62
Width = 150
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'AnsistringCheckBox'
@ -65,28 +65,29 @@ object CheckCompOptsForNewUnitDialog: TCheckCompOptsForNewUnitDialog
AnchorSideTop.Control = AnsistringCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 171
Width = 178
Height = 26
Top = 98
Width = 158
BorderSpacing.Left = 6
BorderSpacing.Top = 10
Caption = 'DoNotWarnCheckBox'
TabOrder = 2
end
object OkButton: TButton
AnchorSideTop.Control = DoNotWarnCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 343
Height = 27
Top = 206
Width = 85
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'OkButton'
OnClick = OkButtonClick
object ButtonPanel1: TButtonPanel
Left = 6
Height = 34
Top = 185
Width = 422
OKButton.Name = 'OKButton'
OKButton.Caption = '&OK'
OKButton.OnClick = OkButtonClick
HelpButton.Name = 'HelpButton'
HelpButton.Caption = '&Help'
CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Close'
CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Cancel'
TabOrder = 3
ShowButtons = [pbOK, pbCancel]
end
end

View File

@ -32,7 +32,7 @@ interface
uses
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls,
StdCtrls, ExtCtrls, ButtonPanel,
CodeToolManager, BasicCodeTools, DefineTemplates,
CompOptsIntf, ProjectIntf, IDEDialogs,
InputHistory, TransferMacros, Project, LazarusIDEStrConsts;
@ -43,8 +43,8 @@ type
TCheckCompOptsForNewUnitDialog = class(TForm)
AnsistringCheckBox: TCheckBox;
ButtonPanel1: TButtonPanel;
DoNotWarnCheckBox: TCheckBox;
OkButton: TButton;
ModeComboBox: TComboBox;
ModeLabel: TLabel;
NoteLabel: TLabel;
@ -160,7 +160,7 @@ var
i: Integer;
begin
Caption:=lisDirectivesForNewUnit;
OkButton.Caption:=lisContinue;
ButtonPanel1.OKButton.Caption:=lisContinue;
ModeLabel.Caption:=lisSyntaxMode;
sl:=TStringList.Create;
@ -188,8 +188,7 @@ begin
if i>High(FPCSyntaxModes) then
begin
MessageDlg(lisCCOErrorCaption, Format(lisInvalidMode, [NewMode]),
mtError, [mbCancel
], 0);
mtError, [mbCancel], 0);
exit;
end;
end;