From 6227cb60030f06086ba24344c3b8f42e517a669d Mon Sep 17 00:00:00 2001 From: juha Date: Sat, 22 Jun 2013 15:35:03 +0000 Subject: [PATCH] Packager: Calculate height of confirm dialog correctly and make OK button the active control. git-svn-id: trunk@41804 - --- packager/confirmpkglistdlg.lfm | 12 +++++------- packager/confirmpkglistdlg.pas | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packager/confirmpkglistdlg.lfm b/packager/confirmpkglistdlg.lfm index 1a4a0c3631..3969a23319 100644 --- a/packager/confirmpkglistdlg.lfm +++ b/packager/confirmpkglistdlg.lfm @@ -3,12 +3,12 @@ object ConfirmPackageListDialog: TConfirmPackageListDialog Height = 240 Top = 152 Width = 450 - ActiveControl = PackagesGrid + ActiveControl = OkButton Caption = 'ConfirmPackageListDialog' ClientHeight = 240 ClientWidth = 450 Position = poScreenCenter - LCLVersion = '0.9.29' + LCLVersion = '1.1' object PackagesGrid: TStringGrid Left = 6 Height = 190 @@ -35,10 +35,10 @@ object ConfirmPackageListDialog: TConfirmPackageListDialog object CancelButton: TBitBtn AnchorSideRight.Side = asrBottom AnchorSideBottom.Side = asrBottom - Left = 366 + Left = 365 Height = 26 Top = 6 - Width = 78 + Width = 79 Align = alRight AutoSize = True BorderSpacing.Around = 6 @@ -46,13 +46,12 @@ object ConfirmPackageListDialog: TConfirmPackageListDialog Constraints.MinWidth = 75 Kind = bkCancel ModalResult = 2 - NumGlyphs = 0 TabOrder = 0 end object OkButton: TBitBtn AnchorSideRight.Side = asrBottom AnchorSideBottom.Side = asrBottom - Left = 285 + Left = 284 Height = 26 Top = 6 Width = 75 @@ -64,7 +63,6 @@ object ConfirmPackageListDialog: TConfirmPackageListDialog Default = True Kind = bkOK ModalResult = 1 - NumGlyphs = 0 TabOrder = 1 end end diff --git a/packager/confirmpkglistdlg.pas b/packager/confirmpkglistdlg.pas index ed7d6fc146..e2aa4e9a89 100644 --- a/packager/confirmpkglistdlg.pas +++ b/packager/confirmpkglistdlg.pas @@ -73,7 +73,7 @@ begin Cells[0, 0] := lisConfirmPackageNewPackageSet; Cells[1, 0] := lisConfirmPackageAction; Cells[2, 0] := lisConfirmPackageOldPackageSet; - d := RowCount * DefaultRowHeight + GridLineWidth - Height; + d := RowCount * (DefaultRowHeight + GridLineWidth) - Height; end; // Auto-grow dialog up to 3/4 of the screen height. d := Min(d, Screen.Height * 3 div 4 - Height);