mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 09:38:50 +01:00
Packager: Use ButtonPanel in ConfirmPkgList dialog. Issue #28169, patch from Alexey Torgashin.
git-svn-id: trunk@49216 -
This commit is contained in:
parent
73ce2ed74c
commit
479aa55225
@ -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
|
||||
|
||||
@ -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];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user