mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:39:20 +02:00
better theming for some dialogs
git-svn-id: trunk@5833 -
This commit is contained in:
parent
c1b9e4bb01
commit
4316d37265
@ -26,6 +26,7 @@ Martin Patik
|
|||||||
Martin Smat
|
Martin Smat
|
||||||
Martyn Ranyard
|
Martyn Ranyard
|
||||||
Mattias Gaertner
|
Mattias Gaertner
|
||||||
|
Mazen Neiffer
|
||||||
Michael A. Hess
|
Michael A. Hess
|
||||||
Micha Nelissen
|
Micha Nelissen
|
||||||
Michal Bukovjan
|
Michal Bukovjan
|
||||||
|
@ -181,7 +181,7 @@ procedure TDiffDialog.DiffDialogResize(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
// text 1
|
// text 1
|
||||||
with Text1GroupBox do begin
|
with Text1GroupBox do begin
|
||||||
SetBounds(3,3,(Parent.ClientWidth-3*3) div 2,65);
|
SetBounds(3,3,(Parent.ClientWidth-3*3) div 2,70);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// text 2
|
// text 2
|
||||||
@ -193,13 +193,15 @@ begin
|
|||||||
// diff preview
|
// diff preview
|
||||||
with DiffGroupbox do begin
|
with DiffGroupbox do begin
|
||||||
SetBounds(Text1GroupBox.Left,Text1GroupBox.Top+Text1GroupBox.Height+5,
|
SetBounds(Text1GroupBox.Left,Text1GroupBox.Top+Text1GroupBox.Height+5,
|
||||||
Parent.ClientWidth-2*Text1GroupBox.Left,Max(1,Parent.ClientHeight-226));
|
Parent.ClientWidth-2*Text1GroupBox.Left,
|
||||||
|
Max(30,Parent.ClientHeight-Text1GroupBox.Height-Text1GroupBox.Top
|
||||||
|
-170));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// options
|
// options
|
||||||
with OptionsGroupBox do begin
|
with OptionsGroupBox do begin
|
||||||
SetBounds(Text1GroupBox.Left,DiffGroupbox.Top+DiffGroupbox.Height+5,
|
SetBounds(Text1GroupBox.Left,DiffGroupbox.Top+DiffGroupbox.Height+5,
|
||||||
DiffGroupbox.Width,106);
|
DiffGroupbox.Width,116);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
@ -485,16 +487,14 @@ end;
|
|||||||
constructor TDiffDialog.Create(TheOwner: TComponent);
|
constructor TDiffDialog.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
if LazarusResources.Find(Classname)=nil then begin
|
Name:='DiffDialog';
|
||||||
Name:='DiffDialog';
|
Caption := lisMenuDiff;
|
||||||
Caption := lisMenuDiff;
|
Width:=600;
|
||||||
Width:=600;
|
Height:=400;
|
||||||
Height:=400;
|
Position:=poScreenCenter;
|
||||||
Position:=poScreenCenter;
|
|
||||||
OnResize:=@DiffDialogResize;
|
|
||||||
SetupComponents;
|
|
||||||
end;
|
|
||||||
IDEDialogLayoutList.ApplyLayout(Self,600,400);
|
IDEDialogLayoutList.ApplyLayout(Self,600,400);
|
||||||
|
OnResize:=@DiffDialogResize;
|
||||||
|
SetupComponents;
|
||||||
OnResize(nil);
|
OnResize(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ type
|
|||||||
OkButton: TButton;
|
OkButton: TButton;
|
||||||
ReplaceAllButton: TButton;
|
ReplaceAllButton: TButton;
|
||||||
CancelButton: TButton;
|
CancelButton: TButton;
|
||||||
|
procedure LazFindReplaceDialogResize(Sender: TObject);
|
||||||
|
procedure OptionsGroupBoxResize(Sender: TObject);
|
||||||
procedure TextToFindComboboxKeyDown(Sender: TObject; var Key: Word;
|
procedure TextToFindComboboxKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
procedure OkButtonClick(Sender: TObject);
|
procedure OkButtonClick(Sender: TObject);
|
||||||
@ -104,233 +106,226 @@ implementation
|
|||||||
{ TLazFindReplaceDialog }
|
{ TLazFindReplaceDialog }
|
||||||
|
|
||||||
constructor TLazFindReplaceDialog.Create(TheOwner:TComponent);
|
constructor TLazFindReplaceDialog.Create(TheOwner:TComponent);
|
||||||
|
var
|
||||||
|
x: Integer;
|
||||||
|
y: Integer;
|
||||||
|
ComboX: Integer;
|
||||||
|
OptionW: Integer;
|
||||||
|
OptionsGrpW: Integer;
|
||||||
|
OptionY: Integer;
|
||||||
|
OptionH: Integer;
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
if LazarusResources.Find(ClassName)=nil then begin
|
Name:='LazFindReplaceDialog';
|
||||||
Name:='LazFindReplaceDialog';
|
Caption:='';
|
||||||
Caption:='';
|
Width:=400;
|
||||||
Width:=400;
|
Height:=300;
|
||||||
Height:=300;
|
BorderStyle:= bsDialog;
|
||||||
BorderStyle:= bsDialog;
|
Position:=poDesigned;
|
||||||
Position:=poDesigned;
|
OnResize:=@LazFindReplaceDialogResize;
|
||||||
|
|
||||||
TextToFindComboBox:=TComboBox.Create(Self);
|
x:=4;
|
||||||
with TextToFindComboBox do begin
|
y:=4;
|
||||||
Name:='TextToFindComboBox';
|
ComboX:=x+90;
|
||||||
Parent:=Self;
|
TextToFindComboBox:=TComboBox.Create(Self);
|
||||||
Left:=90;
|
with TextToFindComboBox do begin
|
||||||
Top:=4;
|
Name:='TextToFindComboBox';
|
||||||
Width:= 306;
|
Parent:=Self;
|
||||||
Anchors:= [akLeft, akTop, akRight];
|
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
||||||
Text:='';
|
Anchors:= [akLeft, akTop, akRight];
|
||||||
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
Text:='';
|
||||||
end;
|
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
||||||
|
|
||||||
TextToFindLabel:=TLabel.Create(Self);
|
|
||||||
with TextToFindLabel do begin
|
|
||||||
Name:='TextToFindLabel';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=8;
|
|
||||||
Top:=8;
|
|
||||||
Width:= TextToFindComboBox.Left-Left;
|
|
||||||
Caption:=dlgTextToFing;
|
|
||||||
FocusControl:= TextToFindComboBox;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceTextComboBox:=TComboBox.Create(Self);
|
|
||||||
with ReplaceTextComboBox do begin
|
|
||||||
Name:='ReplaceTextComboBox';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=TextToFindComboBox.Left;
|
|
||||||
Top:=28;
|
|
||||||
Width:= TextToFindComboBox.Width;
|
|
||||||
Anchors:= [akLeft, akTop, akRight];
|
|
||||||
Text:='';
|
|
||||||
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceWithLabel:=TLabel.Create(Self);
|
|
||||||
with ReplaceWithLabel do begin
|
|
||||||
Name:='ReplaceWithLabel';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=TextToFindLabel.Left;
|
|
||||||
Top:=32;
|
|
||||||
Width:= TextToFindLabel.Width;
|
|
||||||
Caption:=dlgReplaceWith;
|
|
||||||
FocusControl:= ReplaceTextComboBox;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OptionsGroupBox:=TGroupBox.Create(Self);
|
|
||||||
with OptionsGroupBox do begin
|
|
||||||
Name:='OptionsGroupBox';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=4;
|
|
||||||
Top:=58;
|
|
||||||
Width:=194;
|
|
||||||
Height:=150;
|
|
||||||
Caption:=dlgFROpts;
|
|
||||||
end;
|
|
||||||
|
|
||||||
CaseSensitiveCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with CaseSensitiveCheckBox do begin
|
|
||||||
Name:='CaseSensitiveCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := True;
|
|
||||||
Left:=8;
|
|
||||||
Top:=6;
|
|
||||||
Width:=OptionsGroupBox.Width-16;
|
|
||||||
Caption:=dlgCaseSensitive;
|
|
||||||
Hint:=lisDistinguishBigAndSmallLettersEGAAndA;
|
|
||||||
ShowHint:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
WholeWordsOnlyCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with WholeWordsOnlyCheckBox do begin
|
|
||||||
Name:='WholeWordsOnlyCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
Left:=8;
|
|
||||||
Top:=31;
|
|
||||||
Width:=CaseSensitiveCheckBox.Width;
|
|
||||||
Caption:=dlgWholeWordsOnly;
|
|
||||||
Hint:=lisOnlySearchForWholeWords;
|
|
||||||
ShowHint:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
RegularExpressionsCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with RegularExpressionsCheckBox do begin
|
|
||||||
Name:='RegularExpressionsCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
Left:=8;
|
|
||||||
Top:=56;
|
|
||||||
Width:=CaseSensitiveCheckBox.Width;
|
|
||||||
Caption:=dlgRegularExpressions;
|
|
||||||
Hint:=lisActivateRegularExpressionSyntaxForTextAndReplaceme;
|
|
||||||
ShowHint:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
MultiLineCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with MultiLineCheckBox do begin
|
|
||||||
Name:='MultiLineCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
Left:=8;
|
|
||||||
Top:=81;
|
|
||||||
Width:=CaseSensitiveCheckBox.Width;
|
|
||||||
Caption:=dlgMultiLine;
|
|
||||||
Enabled:=false;
|
|
||||||
Hint:=lisAllowSearchingForMultipleLines;
|
|
||||||
ShowHint:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
PromptOnReplaceCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with PromptOnReplaceCheckBox do begin
|
|
||||||
Name:='PromptOnReplaceCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
Left:=8;
|
|
||||||
Top:=106;
|
|
||||||
Width:=CaseSensitiveCheckBox.Width;
|
|
||||||
Caption:=dlgPromptOnReplace;
|
|
||||||
Checked:=true;
|
|
||||||
Hint:=lisAskBeforeReplacingEachFoundText;
|
|
||||||
ShowHint:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OriginRadioGroup:=TRadioGroup.Create(Self);
|
|
||||||
with OriginRadioGroup do begin
|
|
||||||
Name:='OriginRadioGroup';
|
|
||||||
Parent:= Self;
|
|
||||||
Left:= 202;
|
|
||||||
Top:= 58;
|
|
||||||
Width:= 194;
|
|
||||||
Height:=65;
|
|
||||||
Caption:=dlgSROrigin;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(dlgFromCursor);
|
|
||||||
Add(dlgEntireScope);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ScopeRadioGroup:=TRadioGroup.Create(Self);
|
|
||||||
with ScopeRadioGroup do begin
|
|
||||||
Name:='ScopeRadioGroup';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=202;
|
|
||||||
Top:=128;
|
|
||||||
Width:=194;
|
|
||||||
Height:=65;
|
|
||||||
Caption:=dlgScope;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(dlgGlobal);
|
|
||||||
Add(dlgSelectedText);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
DirectionRadioGroup:=TRadioGroup.Create(Self);
|
|
||||||
with DirectionRadioGroup do begin
|
|
||||||
Name:='DirectionRadioGroup';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=202;
|
|
||||||
Top:=198;
|
|
||||||
Width:=194;
|
|
||||||
Height:=65;
|
|
||||||
Caption:=dlgDirection;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(dlgUpWord);
|
|
||||||
Add(dlgDownWord);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OkButton:=TButton.Create(Self);
|
|
||||||
with OkButton do begin
|
|
||||||
Name:='OkButton';
|
|
||||||
Parent:= Self;
|
|
||||||
Default:=true;
|
|
||||||
Left:= 90;
|
|
||||||
Top:= 268;
|
|
||||||
Width:=80;
|
|
||||||
Caption:='Ok';
|
|
||||||
OnClick:=@OkButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceAllButton:=TButton.Create(Self);
|
|
||||||
with ReplaceAllButton do begin
|
|
||||||
Name:='ReplaceAllButton';
|
|
||||||
Parent:= Self;
|
|
||||||
Left:= OkButton.Left+OkButton.Width+10;
|
|
||||||
Top:= OkButton.Top;
|
|
||||||
Width:=120;
|
|
||||||
Caption:=dlgReplaceAll;
|
|
||||||
OnClick:=@ReplaceAllButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
CancelButton:=TButton.Create(Self);
|
|
||||||
with CancelButton do begin
|
|
||||||
Name:='CancelButton';
|
|
||||||
Parent:= Self;
|
|
||||||
Cancel:=true;
|
|
||||||
Left:= ReplaceAllButton.Left+ReplaceAllButton.Width+10;
|
|
||||||
Top:= OkButton.Top;
|
|
||||||
Width:=80;
|
|
||||||
Caption:=dlgCancel;
|
|
||||||
OnClick:=@CancelButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TextToFindLabel:=TLabel.Create(Self);
|
||||||
|
with TextToFindLabel do begin
|
||||||
|
Name:='TextToFindLabel';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(x,y+3,ComboX-x,Height);
|
||||||
|
Caption:=dlgTextToFing;
|
||||||
|
FocusControl:= TextToFindComboBox;
|
||||||
|
end;
|
||||||
|
inc(y,TextToFindComboBox.Height+1);
|
||||||
|
|
||||||
|
ReplaceTextComboBox:=TComboBox.Create(Self);
|
||||||
|
with ReplaceTextComboBox do begin
|
||||||
|
Name:='ReplaceTextComboBox';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
||||||
|
Anchors:= [akLeft, akTop, akRight];
|
||||||
|
Text:='';
|
||||||
|
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ReplaceWithLabel:=TLabel.Create(Self);
|
||||||
|
with ReplaceWithLabel do begin
|
||||||
|
Name:='ReplaceWithLabel';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(x,y+3,ComboX-x,Height);
|
||||||
|
Caption:=dlgReplaceWith;
|
||||||
|
FocusControl:= ReplaceTextComboBox;
|
||||||
|
end;
|
||||||
|
inc(y,ReplaceTextComboBox.Height+1);
|
||||||
|
|
||||||
|
OptionsGrpW:=(ClientWidth-15) div 2;
|
||||||
|
x:=5;
|
||||||
|
OptionsGroupBox:=TGroupBox.Create(Self);
|
||||||
|
with OptionsGroupBox do begin
|
||||||
|
Name:='OptionsGroupBox';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(x,y,OptionsGrpW,160);
|
||||||
|
Caption:=dlgFROpts;
|
||||||
|
OnResize:=@OptionsGroupBoxResize;
|
||||||
|
end;
|
||||||
|
|
||||||
|
OptionH:=OptionsGroupBox.ClientHeight div 5;
|
||||||
|
OptionW:=OptionsGroupBox.ClientWidth-12;
|
||||||
|
OptionY:=2;
|
||||||
|
|
||||||
|
CaseSensitiveCheckBox:=TCheckBox.Create(Self);
|
||||||
|
with CaseSensitiveCheckBox do begin
|
||||||
|
Name:='CaseSensitiveCheckBox';
|
||||||
|
Parent:=OptionsGroupBox;
|
||||||
|
AutoSize := True;
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
Caption:=dlgCaseSensitive;
|
||||||
|
Hint:=lisDistinguishBigAndSmallLettersEGAAndA;
|
||||||
|
ShowHint:=true;
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
WholeWordsOnlyCheckBox:=TCheckBox.Create(Self);
|
||||||
|
with WholeWordsOnlyCheckBox do begin
|
||||||
|
Name:='WholeWordsOnlyCheckBox';
|
||||||
|
Parent:=OptionsGroupBox;
|
||||||
|
AutoSize := False;
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
Caption:=dlgWholeWordsOnly;
|
||||||
|
Hint:=lisOnlySearchForWholeWords;
|
||||||
|
ShowHint:=true;
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
RegularExpressionsCheckBox:=TCheckBox.Create(Self);
|
||||||
|
with RegularExpressionsCheckBox do begin
|
||||||
|
Name:='RegularExpressionsCheckBox';
|
||||||
|
Parent:=OptionsGroupBox;
|
||||||
|
AutoSize := False;
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
Caption:=dlgRegularExpressions;
|
||||||
|
Hint:=lisActivateRegularExpressionSyntaxForTextAndReplaceme;
|
||||||
|
ShowHint:=true;
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
MultiLineCheckBox:=TCheckBox.Create(Self);
|
||||||
|
with MultiLineCheckBox do begin
|
||||||
|
Name:='MultiLineCheckBox';
|
||||||
|
Parent:=OptionsGroupBox;
|
||||||
|
AutoSize := False;
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
Caption:=dlgMultiLine;
|
||||||
|
Enabled:=false;
|
||||||
|
Hint:=lisAllowSearchingForMultipleLines;
|
||||||
|
ShowHint:=true;
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
PromptOnReplaceCheckBox:=TCheckBox.Create(Self);
|
||||||
|
with PromptOnReplaceCheckBox do begin
|
||||||
|
Name:='PromptOnReplaceCheckBox';
|
||||||
|
Parent:=OptionsGroupBox;
|
||||||
|
AutoSize := False;
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
Caption:=dlgPromptOnReplace;
|
||||||
|
Checked:=true;
|
||||||
|
Hint:=lisAskBeforeReplacingEachFoundText;
|
||||||
|
ShowHint:=true;
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
OriginRadioGroup:=TRadioGroup.Create(Self);
|
||||||
|
with OriginRadioGroup do begin
|
||||||
|
Name:='OriginRadioGroup';
|
||||||
|
Parent:= Self;
|
||||||
|
SetBounds(x+OptionsGrpW+x,OptionsGroupBox.Top,OptionsGrpW,65);
|
||||||
|
Caption:=dlgSROrigin;
|
||||||
|
with Items do begin
|
||||||
|
BeginUpdate;
|
||||||
|
Clear;
|
||||||
|
Add(dlgFromCursor);
|
||||||
|
Add(dlgEntireScope);
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ScopeRadioGroup:=TRadioGroup.Create(Self);
|
||||||
|
with ScopeRadioGroup do begin
|
||||||
|
Name:='ScopeRadioGroup';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(OriginRadioGroup.Left,
|
||||||
|
OriginRadioGroup.Top+OriginRadioGroup.Height+5,
|
||||||
|
OriginRadioGroup.Width,65);
|
||||||
|
Caption:=dlgScope;
|
||||||
|
with Items do begin
|
||||||
|
BeginUpdate;
|
||||||
|
Clear;
|
||||||
|
Add(dlgGlobal);
|
||||||
|
Add(dlgSelectedText);
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
DirectionRadioGroup:=TRadioGroup.Create(Self);
|
||||||
|
with DirectionRadioGroup do begin
|
||||||
|
Name:='DirectionRadioGroup';
|
||||||
|
Parent:=Self;
|
||||||
|
SetBounds(OriginRadioGroup.Left,
|
||||||
|
ScopeRadioGroup.Top+ScopeRadioGroup.Height+5,
|
||||||
|
OriginRadioGroup.Width,65);
|
||||||
|
Caption:=dlgDirection;
|
||||||
|
with Items do begin
|
||||||
|
BeginUpdate;
|
||||||
|
Clear;
|
||||||
|
Add(dlgUpWord);
|
||||||
|
Add(dlgDownWord);
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
ItemIndex:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
OkButton:=TButton.Create(Self);
|
||||||
|
with OkButton do begin
|
||||||
|
Name:='OkButton';
|
||||||
|
Parent:= Self;
|
||||||
|
Default:=true;
|
||||||
|
SetBounds(Parent.ClientWidth-350,Parent.ClientHeight-32,120,Height);
|
||||||
|
Caption:='Ok';
|
||||||
|
OnClick:=@OkButtonClick;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ReplaceAllButton:=TButton.Create(Self);
|
||||||
|
with ReplaceAllButton do begin
|
||||||
|
Name:='ReplaceAllButton';
|
||||||
|
Parent:= Self;
|
||||||
|
SetBounds(OkButton.Left+OkButton.Width+10,OkButton.Top,120,Height);
|
||||||
|
Caption:=dlgReplaceAll;
|
||||||
|
OnClick:=@ReplaceAllButtonClick;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CancelButton:=TButton.Create(Self);
|
||||||
|
with CancelButton do begin
|
||||||
|
Name:='CancelButton';
|
||||||
|
Parent:= Self;
|
||||||
|
Cancel:=true;
|
||||||
|
SetBounds(ReplaceAllButton.Left+ReplaceAllButton.Width+10,OkButton.Top,
|
||||||
|
80,Height);
|
||||||
|
Caption:=dlgCancel;
|
||||||
|
OnClick:=@CancelButtonClick;
|
||||||
|
end;
|
||||||
|
|
||||||
fReplaceAllClickedLast:=false;
|
fReplaceAllClickedLast:=false;
|
||||||
ActiveControl:=TextToFindComboBox;
|
ActiveControl:=TextToFindComboBox;
|
||||||
end;
|
end;
|
||||||
@ -367,6 +362,106 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TLazFindReplaceDialog.OptionsGroupBoxResize(Sender: TObject);
|
||||||
|
var
|
||||||
|
OptionH: Integer;
|
||||||
|
OptionW: Integer;
|
||||||
|
OptionY: Integer;
|
||||||
|
begin
|
||||||
|
OptionH:=OptionsGroupBox.ClientHeight div 5;
|
||||||
|
OptionW:=OptionsGroupBox.ClientWidth-12;
|
||||||
|
OptionY:=2;
|
||||||
|
|
||||||
|
with CaseSensitiveCheckBox do begin
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with WholeWordsOnlyCheckBox do begin
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with RegularExpressionsCheckBox do begin
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with MultiLineCheckBox do begin
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with PromptOnReplaceCheckBox do begin
|
||||||
|
SetBounds(8,OptionY,OptionW,Height);
|
||||||
|
inc(OptionY,OptionH);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLazFindReplaceDialog.LazFindReplaceDialogResize(Sender: TObject);
|
||||||
|
var
|
||||||
|
x: Integer;
|
||||||
|
y: Integer;
|
||||||
|
ComboX: Integer;
|
||||||
|
OptionsGrpW: Integer;
|
||||||
|
begin
|
||||||
|
x:=4;
|
||||||
|
y:=4;
|
||||||
|
ComboX:=x+90;
|
||||||
|
with TextToFindComboBox do begin
|
||||||
|
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with TextToFindLabel do begin
|
||||||
|
SetBounds(x,y+3,ComboX-x,Height);
|
||||||
|
end;
|
||||||
|
inc(y,TextToFindComboBox.Height+1);
|
||||||
|
|
||||||
|
with ReplaceTextComboBox do begin
|
||||||
|
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ReplaceWithLabel do begin
|
||||||
|
SetBounds(x,y+3,ComboX-x,Height);
|
||||||
|
end;
|
||||||
|
inc(y,ReplaceTextComboBox.Height+1);
|
||||||
|
|
||||||
|
OptionsGrpW:=(ClientWidth-15) div 2;
|
||||||
|
x:=5;
|
||||||
|
with OptionsGroupBox do begin
|
||||||
|
SetBounds(x,y,OptionsGrpW,160);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with OriginRadioGroup do begin
|
||||||
|
SetBounds(x+OptionsGrpW+x,OptionsGroupBox.Top,OptionsGrpW,65);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ScopeRadioGroup do begin
|
||||||
|
SetBounds(OriginRadioGroup.Left,
|
||||||
|
OriginRadioGroup.Top+OriginRadioGroup.Height+5,
|
||||||
|
OriginRadioGroup.Width,65);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with DirectionRadioGroup do begin
|
||||||
|
SetBounds(OriginRadioGroup.Left,
|
||||||
|
ScopeRadioGroup.Top+ScopeRadioGroup.Height+5,
|
||||||
|
OriginRadioGroup.Width,65);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with OkButton do begin
|
||||||
|
SetBounds(Parent.ClientWidth-350,Parent.ClientHeight-32,120,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ReplaceAllButton do begin
|
||||||
|
SetBounds(OkButton.Left+OkButton.Width+10,OkButton.Top,120,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with CancelButton do begin
|
||||||
|
SetBounds(ReplaceAllButton.Left+ReplaceAllButton.Width+10,OkButton.Top,
|
||||||
|
80,Height);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.OkButtonClick(Sender:TObject);
|
procedure TLazFindReplaceDialog.OkButtonClick(Sender:TObject);
|
||||||
begin
|
begin
|
||||||
if not CheckInput then exit;
|
if not CheckInput then exit;
|
||||||
|
@ -229,6 +229,7 @@ const
|
|||||||
ecAboutLazarus = ecUserFirst + 900;
|
ecAboutLazarus = ecUserFirst + 900;
|
||||||
ecOnlineHelp = ecUserFirst + 901;
|
ecOnlineHelp = ecUserFirst + 901;
|
||||||
ecConfigureHelp = ecUserFirst + 902;
|
ecConfigureHelp = ecUserFirst + 902;
|
||||||
|
ecContextHelp = ecUserFirst + 903;
|
||||||
|
|
||||||
// designer
|
// designer
|
||||||
ecCopyComponents = ecUserFirst + 1000;
|
ecCopyComponents = ecUserFirst + 1000;
|
||||||
@ -678,6 +679,7 @@ begin
|
|||||||
ecAboutLazarus: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
ecAboutLazarus: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
ecOnlineHelp: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
ecOnlineHelp: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
ecConfigureHelp: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
ecConfigureHelp: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
|
ecContextHelp: SetResult(VK_F1,[],VK_UNKNOWN,[]);
|
||||||
|
|
||||||
// designer
|
// designer
|
||||||
ecCopyComponents: SetResult(VK_C,[ssCtrl],VK_Insert,[ssCtrl]);
|
ecCopyComponents: SetResult(VK_C,[ssCtrl],VK_Insert,[ssCtrl]);
|
||||||
@ -1224,6 +1226,7 @@ begin
|
|||||||
ecAboutLazarus : Result:= lisMenuAboutLazarus;
|
ecAboutLazarus : Result:= lisMenuAboutLazarus;
|
||||||
ecOnlineHelp : Result:= lisMenuOnlineHelp;
|
ecOnlineHelp : Result:= lisMenuOnlineHelp;
|
||||||
ecConfigureHelp : Result:= lisMenuConfigureHelp;
|
ecConfigureHelp : Result:= lisMenuConfigureHelp;
|
||||||
|
ecContextHelp : Result:= lisMenuContextHelp;
|
||||||
|
|
||||||
// desginer
|
// desginer
|
||||||
ecCopyComponents : Result:= lisDsgCopyComponents;
|
ecCopyComponents : Result:= lisDsgCopyComponents;
|
||||||
@ -2088,6 +2091,7 @@ begin
|
|||||||
AddDefault(C,'About Lazarus',ecAboutLazarus);
|
AddDefault(C,'About Lazarus',ecAboutLazarus);
|
||||||
AddDefault(C,'Online Help',ecOnlineHelp);
|
AddDefault(C,'Online Help',ecOnlineHelp);
|
||||||
AddDefault(C,'Configure Help',ecConfigureHelp);
|
AddDefault(C,'Configure Help',ecConfigureHelp);
|
||||||
|
AddDefault(C,'Context sensitive help',ecContextHelp);
|
||||||
|
|
||||||
// designer
|
// designer
|
||||||
C:=Categories[AddCategory('Designer',lisKeyCatDesigner,caDesign)];
|
C:=Categories[AddCategory('Designer',lisKeyCatDesigner,caDesign)];
|
||||||
|
@ -246,6 +246,7 @@ resourcestring
|
|||||||
lisMenuAboutLazarus = 'About Lazarus';
|
lisMenuAboutLazarus = 'About Lazarus';
|
||||||
lisMenuOnlineHelp = 'Online Help';
|
lisMenuOnlineHelp = 'Online Help';
|
||||||
lisMenuConfigureHelp = 'Configure Help';
|
lisMenuConfigureHelp = 'Configure Help';
|
||||||
|
lisMenuContextHelp = 'Context sensitive Help';
|
||||||
|
|
||||||
lisDsgCopyComponents = 'Copy selected components to clipboard';
|
lisDsgCopyComponents = 'Copy selected components to clipboard';
|
||||||
lisDsgCutComponents = 'Cut selected components to clipboard';
|
lisDsgCutComponents = 'Cut selected components to clipboard';
|
||||||
|
@ -274,7 +274,7 @@ end;
|
|||||||
procedure THTMLBrowserHelpViewer.Load(Storage: TConfigStorage);
|
procedure THTMLBrowserHelpViewer.Load(Storage: TConfigStorage);
|
||||||
begin
|
begin
|
||||||
BrowserPath:=Storage.GetValue('Browser/Path','');
|
BrowserPath:=Storage.GetValue('Browser/Path','');
|
||||||
BrowserParams:=Storage.GetValue('Browser/Params','');
|
BrowserParams:=Storage.GetValue('Browser/Params','%s');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure THTMLBrowserHelpViewer.Save(Storage: TConfigStorage);
|
procedure THTMLBrowserHelpViewer.Save(Storage: TConfigStorage);
|
||||||
|
@ -355,6 +355,7 @@ type
|
|||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TCustomPropertiesGrid }
|
{ TCustomPropertiesGrid }
|
||||||
|
|
||||||
TCustomPropertiesGrid = class(TOICustomPropertyGrid)
|
TCustomPropertiesGrid = class(TOICustomPropertyGrid)
|
||||||
|
@ -1543,7 +1543,7 @@ begin
|
|||||||
if PropInfo^.PropType^.Kind in Filter then begin
|
if PropInfo^.PropType^.Kind in Filter then begin
|
||||||
// check if name already exists in list
|
// check if name already exists in list
|
||||||
i:=FCount-1;
|
i:=FCount-1;
|
||||||
while (i>=0) and (BigList^[i]^.Name<>PropInfo^.Name) do
|
while (i>=0) and (CompareText(BigList^[i]^.Name,PropInfo^.Name)<>0) do
|
||||||
dec(i);
|
dec(i);
|
||||||
if (i<0) then begin
|
if (i<0) then begin
|
||||||
// add property info to BigList
|
// add property info to BigList
|
||||||
|
@ -704,7 +704,7 @@ type
|
|||||||
property PopupMenu;
|
property PopupMenu;
|
||||||
property ReadOnly;
|
property ReadOnly;
|
||||||
property ScrollBars;
|
property ScrollBars;
|
||||||
property Tabstop;
|
property TabStop;
|
||||||
property Visible;
|
property Visible;
|
||||||
property WordWrap;
|
property WordWrap;
|
||||||
end;
|
end;
|
||||||
@ -1172,6 +1172,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.162 2004/08/22 12:10:56 mattias
|
||||||
|
better theming for some dialogs
|
||||||
|
|
||||||
Revision 1.161 2004/08/18 09:31:21 mattias
|
Revision 1.161 2004/08/18 09:31:21 mattias
|
||||||
removed obsolete unit vclglobals
|
removed obsolete unit vclglobals
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ SpecFile=lazarus-$LazVersion-$LazRelease.spec
|
|||||||
|
|
||||||
# download lazarus cvs if necessary
|
# download lazarus cvs if necessary
|
||||||
if [ ! -f $SrcTGZ ]; then
|
if [ ! -f $SrcTGZ ]; then
|
||||||
./create_lazarus_export_tgz.sh $SrcTGZ
|
sh create_lazarus_export_tgz.sh $SrcTGZ
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# put src tgz into rpm build directory
|
# put src tgz into rpm build directory
|
||||||
|
Loading…
Reference in New Issue
Block a user