mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:29:21 +02:00
TaskDialog: TLCLTaskDialog:
- fix crash if MainIcon = tdiNone - fix left-aligning ExpandedText in footer area if FooterIcon = tdiNone - remove unused parameter from method declaration.
This commit is contained in:
parent
925b576e48
commit
8fab0d8cde
@ -122,7 +122,7 @@ type
|
|||||||
procedure AddCheckBox(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
procedure AddCheckBox(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
||||||
procedure AddExpandButton(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
procedure AddExpandButton(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
||||||
function AddBevel(var ATop: Integer; aWidth: Integer; AParent: TWinControl; Hidden: Boolean = False): TBevel;
|
function AddBevel(var ATop: Integer; aWidth: Integer; AParent: TWinControl; Hidden: Boolean = False): TBevel;
|
||||||
procedure AddFooter(const ALeft: Integer; var ATop, XB: Integer; AFontHeight, AWidth: Integer; APArent: TWinControl);
|
procedure AddFooter(var ALeft: Integer; var ATop: Integer; AFontHeight, AWidth: Integer; APArent: TWinControl);
|
||||||
function AddLabel(const AText: string; BigFont: Boolean; const ALeft: Integer; var ATop: Integer; AFontHeight,
|
function AddLabel(const AText: string; BigFont: Boolean; const ALeft: Integer; var ATop: Integer; AFontHeight,
|
||||||
AWidth: Integer; APArent: TWinControl; Hidden: Boolean = False): TLabel;
|
AWidth: Integer; APArent: TWinControl; Hidden: Boolean = False): TLabel;
|
||||||
procedure AddQueryCombo(const ALeft: Integer; var ATop: Integer; AWidth: Integer; AParent: TWinControl);
|
procedure AddQueryCombo(const ALeft: Integer; var ATop: Integer; AWidth: Integer; AParent: TWinControl);
|
||||||
@ -756,27 +756,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLCLTaskDialog.AddFooter(const ALeft: Integer; var ATop, XB: Integer; AFontHeight, AWidth: Integer; APArent: TWinControl);
|
procedure TLCLTaskDialog.AddFooter(var ALeft: Integer; var ATop: Integer; AFontHeight, AWidth: Integer; APArent: TWinControl);
|
||||||
var
|
//ALeft must be adjusted by AddFooter if FooterIcon exists, so that we can left-align
|
||||||
ALabelLeft: Integer;
|
//ExpandedText in the Footer area with the FooterText (in case of tfExpandFooterArea)
|
||||||
|
|
||||||
(*
|
|
||||||
procedure AddBevel;
|
|
||||||
var
|
|
||||||
BX: integer;
|
|
||||||
begin
|
|
||||||
with TBevel.Create(Self) do begin
|
|
||||||
Parent := AParent;
|
|
||||||
//if (FooterImage<>nil) and (ATop<FooterImage.Top+FooterImage.Height) then
|
|
||||||
// BX := ALeft else
|
|
||||||
// BX := BevelMargin;
|
|
||||||
SetBounds(BevelMargin,ATop,aWidth-2*BevelMargin,BevelHeight);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
begin
|
begin
|
||||||
debugln(['AddFooterText: XB=',XB]);
|
//debugln(['AddFooterText: XB=',XB]);
|
||||||
//if XB<>0 then
|
|
||||||
AddBevel(ATop, aWidth, AParent);
|
AddBevel(ATop, aWidth, AParent);
|
||||||
inc(ATop,LabelVSPacing div 2);
|
inc(ATop,LabelVSPacing div 2);
|
||||||
if (LCL_FOOTERIMAGES[TF_FOOTERICON(FDlg.FooterIcon)]<>0) then
|
if (LCL_FOOTERIMAGES[TF_FOOTERICON(FDlg.FooterIcon)]<>0) then
|
||||||
@ -791,13 +775,9 @@ begin
|
|||||||
FooterImage.Proportional := True;
|
FooterImage.Proportional := True;
|
||||||
FooterImage.Center := True;
|
FooterImage.Center := True;
|
||||||
FooterImage.SetBounds(GlobalLeftMargin,ATop,SmallImageSize,SmallImageSize);
|
FooterImage.SetBounds(GlobalLeftMargin,ATop,SmallImageSize,SmallImageSize);
|
||||||
ALabelLeft := GlobalLeftMargin + Aleft + MainImage.Width;
|
ALeft := GlobalLeftMargin + Aleft + FooterImage.Width;
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
ALabelLeft := ALeft;//24;
|
|
||||||
end;
|
end;
|
||||||
Element[tdeFooter] := AddLabel(FooterText, False, ALabelLeft, ATop, AFontHeight, AWidth, AParent);
|
Element[tdeFooter] := AddLabel(FooterText, False, ALeft, ATop, AFontHeight, AWidth, AParent);
|
||||||
Dec(ATop, LabelVSpacing div 2);
|
Dec(ATop, LabelVSpacing div 2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1152,7 +1132,10 @@ begin
|
|||||||
|
|
||||||
// add FooterText text with optional icon
|
// add FooterText text with optional icon
|
||||||
if (FooterText <> '') then
|
if (FooterText <> '') then
|
||||||
AddFooter(GlobalLeftMargin, ATop, XB, FontHeight, aWidth, CurrParent);
|
begin
|
||||||
|
ALeft := GlobalLeftMargin;
|
||||||
|
AddFooter(ALeft, ATop, FontHeight, aWidth, CurrParent);
|
||||||
|
end;
|
||||||
|
|
||||||
if (ExpandedText <> '') and (tfExpandFooterArea in FDlg.Flags) then
|
if (ExpandedText <> '') and (tfExpandFooterArea in FDlg.Flags) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user