Packager: Calculate height of confirm dialog correctly and make OK button the active control.

git-svn-id: trunk@41804 -
This commit is contained in:
juha 2013-06-22 15:35:03 +00:00
parent b29ad350b8
commit 6227cb6003
2 changed files with 6 additions and 8 deletions

View File

@ -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

View File

@ -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);