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

View File

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