Packager: Use ButtonPanel in ConfirmPkgList dialog. Issue #28169, patch from Alexey Torgashin.

git-svn-id: trunk@49216 -
This commit is contained in:
juha 2015-05-29 22:51:32 +00:00
parent 73ce2ed74c
commit 479aa55225
2 changed files with 34 additions and 57 deletions

View File

@ -1,69 +1,43 @@
object ConfirmPackageListDialog: TConfirmPackageListDialog
Left = 342
Height = 240
Height = 273
Top = 152
Width = 450
ActiveControl = OkButton
Width = 462
BorderIcons = [biSystemMenu]
Caption = 'ConfirmPackageListDialog'
ClientHeight = 240
ClientWidth = 450
ClientHeight = 273
ClientWidth = 462
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.1'
LCLVersion = '1.5'
object PackagesGrid: TStringGrid
Left = 6
Height = 190
Height = 229
Top = 6
Width = 438
Width = 450
Align = alClient
AutoEdit = False
BorderSpacing.Around = 6
ColCount = 3
FixedCols = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goColSpanning, goSmoothScroll]
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goThumbTracking, goColSpanning, goSmoothScroll]
TabOrder = 0
end
object BtnPanel: TPanel
Left = 0
Height = 38
Top = 202
object ButtonPanel1: TButtonPanel
Left = 6
Height = 26
Top = 241
Width = 450
Align = alBottom
BevelOuter = bvNone
ClientHeight = 38
ClientWidth = 450
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
object CancelButton: TBitBtn
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 365
Height = 26
Top = 6
Width = 79
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Cancel'
Constraints.MinWidth = 75
Kind = bkCancel
ModalResult = 2
TabOrder = 0
end
object OkButton: TBitBtn
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 284
Height = 26
Top = 6
Width = 75
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
Caption = '&OK'
Constraints.MinWidth = 75
Default = True
Kind = bkOK
ModalResult = 1
TabOrder = 1
end
ShowButtons = [pbOK, pbCancel]
ShowBevel = False
end
end

View File

@ -25,17 +25,16 @@ unit ConfirmPkgListDlg;
interface
uses
Buttons, Classes, ExtCtrls, Grids, Forms, Controls;
Buttons, Classes, ExtCtrls, Grids, Forms, Controls, ButtonPanel;
type
{ TConfirmPackageListDialog }
TConfirmPackageListDialog = class(TForm)
BtnPanel: TPanel;
CancelButton: TBitBtn;
OkButton: TBitBtn;
ButtonPanel1: TButtonPanel;
PackagesGrid: TStringGrid;
procedure FormCreate(Sender: TObject);
private
function Confirm(AChangesReport: TStrings): Boolean;
end;
@ -63,6 +62,13 @@ end;
{ TConfirmPackageListDialog }
procedure TConfirmPackageListDialog.FormCreate(Sender: TObject);
begin
Caption := lisConfirmNewPackageSetForTheIDE;
ButtonPanel1.OkButton.Caption := lisContinue;
ButtonPanel1.CancelButton.Caption := lisCancel;
end;
function TConfirmPackageListDialog.Confirm(AChangesReport: TStrings): Boolean;
var
s: String;
@ -78,9 +84,6 @@ begin
// Auto-grow dialog up to 3/4 of the screen height.
d := Min(d, Screen.Height * 3 div 4 - Height);
Height := Height + d;
Caption := lisConfirmNewPackageSetForTheIDE;
OkButton.Caption := lisContinue;
CancelButton.Caption := lisCancel;
for i := 1 to AChangesReport.Count do begin
s := AChangesReport[i - 1];