IDE: find in files dialog: disable autosize if old size is available

git-svn-id: trunk@26305 -
This commit is contained in:
mattias 2010-06-27 20:45:22 +00:00
parent 8a4ade1c32
commit 91dbe3bee6
3 changed files with 58 additions and 48 deletions

View File

@ -3,7 +3,6 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
Height = 402
Top = 155
Width = 516
AutoSize = True
Caption = 'Find in files'
ClientHeight = 402
ClientWidth = 516
@ -20,8 +19,8 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 70
Top = 56
Height = 83
Top = 68
Width = 504
Anchors = [akTop, akLeft, akRight]
AutoFill = True
@ -55,8 +54,8 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 6
Height = 93
Top = 132
Height = 36
Top = 157
Width = 504
Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
@ -74,8 +73,8 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 75
ClientWidth = 500
ClientHeight = 15
ClientWidth = 496
ItemIndex = 1
Items.Strings = (
'search all files in project'
@ -90,15 +89,15 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 6
Height = 133
Top = 231
Height = 157
Top = 199
Width = 504
Align = alBottom
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Directory Options'
ClientHeight = 115
ClientWidth = 500
ClientHeight = 136
ClientWidth = 496
Enabled = False
TabOrder = 3
object DirectoryLabel: TLabel
@ -106,9 +105,9 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = DirectoryComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 9
Width = 49
Height = 18
Top = 10
Width = 64
BorderSpacing.Left = 6
Caption = 'Directory:'
ParentColor = False
@ -118,9 +117,9 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = DirectoryComboBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 14
Top = 39
Width = 121
Height = 18
Top = 45
Width = 157
BorderSpacing.Left = 6
BorderSpacing.Top = 12
Caption = 'File mask (*;*.*;*.bak?):'
@ -131,15 +130,15 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DirectoryOptionsGroupBox
AnchorSideRight.Control = DirectoryBrowse
Left = 61
Height = 21
Left = 76
Height = 27
Top = 6
Width = 389
Width = 323
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 13
ItemHeight = 0
TabOrder = 0
end
object DirectoryBrowse: TBitBtn
@ -147,10 +146,10 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = DirectoryComboBox
AnchorSideRight.Control = DirectoryOptionsGroupBox
AnchorSideRight.Side = asrBottom
Left = 456
Height = 23
Left = 405
Height = 27
Top = 6
Width = 38
Width = 85
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Right = 6
@ -167,13 +166,13 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideRight.Control = DirectoryComboBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 59
Width = 444
Height = 27
Top = 69
Width = 393
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
ItemHeight = 13
ItemHeight = 0
TabOrder = 2
Text = '*.pas;*.pp;*.inc'
end
@ -182,9 +181,9 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = FileMaskComboBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 92
Width = 126
Height = 22
Top = 108
Width = 175
BorderSpacing.Left = 6
BorderSpacing.Top = 12
BorderSpacing.Bottom = 6
@ -194,9 +193,18 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 26
Top = 370
Height = 34
Top = 362
Width = 504
OKButton.Name = 'OKButton'
OKButton.Caption = '&OK'
HelpButton.Name = 'HelpButton'
HelpButton.Caption = '&Help'
CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Close'
CloseButton.Enabled = False
CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Cancel'
TabOrder = 6
ShowButtons = [pbOK, pbCancel, pbHelp]
ShowBevel = False
@ -208,10 +216,10 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 68
Height = 21
Top = 29
Width = 442
Left = 91
Height = 27
Top = 35
Width = 419
Anchors = [akTop, akLeft, akRight]
AutoComplete = True
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
@ -220,7 +228,7 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Enabled = False
ItemHeight = 13
ItemHeight = 0
TabOrder = 5
end
object ReplaceCheckBox: TCheckBox
@ -228,9 +236,9 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = ReplaceTextComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 17
Top = 31
Width = 56
Height = 22
Top = 37
Width = 79
BorderSpacing.Left = 6
Caption = 'Replace'
Enabled = False
@ -242,9 +250,9 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = TextToFindComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 9
Width = 65
Height = 18
Top = 10
Width = 81
BorderSpacing.Left = 6
Caption = 'Text To Find:'
ParentColor = False
@ -255,17 +263,17 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 77
Height = 21
Left = 93
Height = 27
Top = 6
Width = 433
Width = 417
Anchors = [akTop, akLeft, akRight]
AutoComplete = True
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 13
ItemHeight = 0
TabOrder = 0
end
object SelectDirectoryDialog: TSelectDirectoryDialog

View File

@ -176,6 +176,7 @@ begin
UpdateReplaceCheck;
DirectoryOptionsGroupBox.Enabled:=WhereRadioGroup.ItemIndex=2;
AutoSize:=IDEDialogLayoutList.Find(Self,false)=nil;
IDEDialogLayoutList.ApplyLayout(Self);
end;

View File

@ -518,6 +518,7 @@ var
begin
if (ADialog=nil) or (Self=nil) then exit;
ALayout:=Find(ADialog,true);
//debugln(['TIDEDialogLayoutList.ApplyLayout ',ALayout.Name,' ',ALayout.SizeValid,' ',ALayout.Width,',',ALayout.Height]);
if ALayout.SizeValid then begin
NewWidth:=ALayout.Width;
NewHeight:=ALayout.Height;