TaskDialog: fix typo in variable/propertyname (collaps -> collapse), as pointed out by Maxim.

This commit is contained in:
Bart 2023-08-09 23:00:29 +02:00
parent 29240dfd2b
commit 91052758c8
3 changed files with 19 additions and 19 deletions

View File

@ -627,7 +627,7 @@ type
FButton: TTaskDialogButtonItem; FButton: TTaskDialogButtonItem;
FButtons: TTaskDialogButtons; FButtons: TTaskDialogButtons;
FCaption: TTranslateString; FCaption: TTranslateString;
FCollapsButtonCaption: TTranslateString; FCollapseButtonCaption: TTranslateString;
FCommonButtons: TTaskDialogCommonButtons; FCommonButtons: TTaskDialogCommonButtons;
FDefaultButton: TTaskDialogCommonButton; FDefaultButton: TTaskDialogCommonButton;
FExpandButtonCaption: TTranslateString; FExpandButtonCaption: TTranslateString;
@ -694,7 +694,7 @@ type
property Buttons: TTaskDialogButtons read FButtons write SetButtons; property Buttons: TTaskDialogButtons read FButtons write SetButtons;
property Caption: TTranslateString read FCaption write FCaption; property Caption: TTranslateString read FCaption write FCaption;
property CommonButtons: TTaskDialogCommonButtons read FCommonButtons write FCommonButtons default [tcbOk, tcbCancel]; property CommonButtons: TTaskDialogCommonButtons read FCommonButtons write FCommonButtons default [tcbOk, tcbCancel];
property CollapsButtonCaption: TTranslateString read FCollapsButtonCaption write FCollapsButtonCaption; property CollapseButtonCaption: TTranslateString read FCollapseButtonCaption write FCollapseButtonCaption;
property DefaultButton: TTaskDialogCommonButton read FDefaultButton write FDefaultButton default tcbOk; property DefaultButton: TTaskDialogCommonButton read FDefaultButton write FDefaultButton default tcbOk;
property ExpandButtonCaption: TTranslateString read FExpandButtonCaption write FExpandButtonCaption; property ExpandButtonCaption: TTranslateString read FExpandButtonCaption write FExpandButtonCaption;
property ExpandedText: TTranslateString read FExpandedText write FExpandedText; property ExpandedText: TTranslateString read FExpandedText write FExpandedText;
@ -734,7 +734,7 @@ type
property Buttons; property Buttons;
property Caption; property Caption;
property CommonButtons; property CommonButtons;
property CollapsButtonCaption; property CollapseButtonCaption;
property DefaultButton; property DefaultButton;
property ExpandButtonCaption; property ExpandButtonCaption;
property ExpandedText; property ExpandedText;

View File

@ -1864,7 +1864,7 @@ var
end; end;
ExpandedInformation := Utf8ToUtf16(ADlg.ExpandedText); ExpandedInformation := Utf8ToUtf16(ADlg.ExpandedText);
CollapsedControlText := Utf8ToUtf16(ADlg.ExpandButtonCaption); CollapsedControlText := Utf8ToUtf16(ADlg.ExpandButtonCaption);
ExpandedControlText := Utf8ToUtf16(ADlg.CollapsButtonCaption); ExpandedControlText := Utf8ToUtf16(ADlg.CollapseButtonCaption);
Footer := Utf8ToUtf16(ADlg.FooterText); Footer := Utf8ToUtf16(ADlg.FooterText);

View File

@ -39,7 +39,7 @@ type
//CustomButtons, Radios: TStringList; //CustomButtons, Radios: TStringList;
DialogCaption, DlgTitle, DlgText, DialogCaption, DlgTitle, DlgText,
ExpandButtonCaption, CollapsButtonCaption, ExpandedText, FooterText, ExpandButtonCaption, CollapseButtonCaption, ExpandedText, FooterText,
VerificationText: String; VerificationText: String;
CommonButtons: TTaskDialogCommonButtons; CommonButtons: TTaskDialogCommonButtons;
@ -53,7 +53,7 @@ type
QueryEdit: TEdit; QueryEdit: TEdit;
/// the Task Dialog optional checkbox /// the Task Dialog optional checkbox
VerifyCheckBox: TCheckBox; VerifyCheckBox: TCheckBox;
/// the Expand/Collaps button /// the Expand/Collapse button
ExpandBtn: TButton; ExpandBtn: TButton;
procedure GetDefaultButtons(out aButtonDef, aRadioDef: TModalResult); procedure GetDefaultButtons(out aButtonDef, aRadioDef: TModalResult);
@ -74,7 +74,7 @@ type
procedure SetupTimer; procedure SetupTimer;
procedure ResetTimer; procedure ResetTimer;
procedure ExpandDialog; procedure ExpandDialog;
procedure CollapsDialog; procedure CollapseDialog;
procedure DoDialogConstructed; procedure DoDialogConstructed;
procedure DoDialogCreated; procedure DoDialogCreated;
@ -343,7 +343,7 @@ begin
DlgTitle := FDlg.Title; DlgTitle := FDlg.Title;
DlgText := FDlg.Text; DlgText := FDlg.Text;
ExpandButtonCaption := FDlg.ExpandButtonCaption; ExpandButtonCaption := FDlg.ExpandButtonCaption;
CollapsButtonCaption := FDlg.CollapsButtonCaption; CollapseButtonCaption := FDlg.CollapseButtonCaption;
ExpandedText := FDlg.ExpandedText; ExpandedText := FDlg.ExpandedText;
FooterText := FDlg.FooterText; FooterText := FDlg.FooterText;
VerificationText := FDlg.VerificationText; VerificationText := FDlg.VerificationText;
@ -612,18 +612,18 @@ begin
CurrTabOrder := Panel.TabOrder; CurrTabOrder := Panel.TabOrder;
if (ExpandButtonCaption = '') then if (ExpandButtonCaption = '') then
begin begin
if (CollapsButtonCaption = '') then if (CollapseButtonCaption = '') then
begin begin
//ToDo: make this a resourcestring in LCLStrConsts unit //ToDo: make this a resourcestring in LCLStrConsts unit
ExpandButtonCaption := 'Show details'; ExpandButtonCaption := 'Show details';
CollapsButtonCaption := 'Hide details'; CollapseButtonCaption := 'Hide details';
end end
else else
ExpandButtonCaption := CollapsButtonCaption; ExpandButtonCaption := CollapseButtonCaption;
end; end;
if (CollapsButtonCaption = '') then if (CollapseButtonCaption = '') then
CollapsButtonCaption := ExpandButtonCaption; CollapseButtonCaption := ExpandButtonCaption;
WB := Max(Canvas.TextWidth(ExpandButtonCaption), Canvas.TextWidth(CollapsButtonCaption)) +32;//52; WB := Max(Canvas.TextWidth(ExpandButtonCaption), Canvas.TextWidth(CollapseButtonCaption)) +32;//52;
if (ALeft+WB > XB) then if (ALeft+WB > XB) then
begin begin
inc(ATop,32); inc(ATop,32);
@ -640,7 +640,7 @@ begin
if not (tfExpandedByDefault in FDlg.Flags) then if not (tfExpandedByDefault in FDlg.Flags) then
ExpandBtn.Caption := ExpandButtonCaption ExpandBtn.Caption := ExpandButtonCaption
else else
ExpandBtn.Caption := CollapsButtonCaption; ExpandBtn.Caption := CollapseButtonCaption;
ExpandBtn.ModalResult := mrNone; ExpandBtn.ModalResult := mrNone;
ExpandBtn.TabOrder := CurrTabOrder; ExpandBtn.TabOrder := CurrTabOrder;
ExpandBtn.OnClick := @OnExpandButtonClicked; ExpandBtn.OnClick := @OnExpandButtonClicked;
@ -779,7 +779,7 @@ begin
if not FExpanded then if not FExpanded then
ExpandDialog ExpandDialog
else else
CollapsDialog; CollapseDialog;
FExpanded := not FExpanded; FExpanded := not FExpanded;
{$PUSH} {$PUSH}
{$ObjectChecks OFF} {$ObjectChecks OFF}
@ -847,10 +847,10 @@ begin
//ToDo: actually expand the dialog //ToDo: actually expand the dialog
end; end;
procedure TLCLTaskDialog.CollapsDialog; procedure TLCLTaskDialog.CollapseDialog;
begin begin
ExpandBtn.Caption := CollapsButtonCaption; ExpandBtn.Caption := CollapseButtonCaption;
//ToDo: actually collaps the dialog //ToDo: actually collapse the dialog
end; end;
procedure TLCLTaskDialog.DoDialogConstructed; procedure TLCLTaskDialog.DoDialogConstructed;