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

View File

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

View File

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