mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-28 19:16:06 +02:00
LCL: Fix wordwrap of Title in PopupNotifier.
git-svn-id: trunk@59487 -
This commit is contained in:
parent
e15804e480
commit
96746c2c7c
@ -231,7 +231,9 @@ begin
|
|||||||
lblTitle.Font.Name := 'default';
|
lblTitle.Font.Name := 'default';
|
||||||
lblTitle.Font.Size := 0;
|
lblTitle.Font.Size := 0;
|
||||||
lblTitle.Font.Color := clDefault;
|
lblTitle.Font.Color := clDefault;
|
||||||
|
lblTitle.Font.Style := [fsBold];
|
||||||
lblTitle.Caption := 'Caption';
|
lblTitle.Caption := 'Caption';
|
||||||
|
lblTitle.Wordwrap := true;
|
||||||
lblTitle.ParentColor := True;
|
lblTitle.ParentColor := True;
|
||||||
lblTitle.OnClick := HideForm;
|
lblTitle.OnClick := HideForm;
|
||||||
|
|
||||||
@ -279,8 +281,6 @@ end;
|
|||||||
procedure TNotifierForm.CreateHandle;
|
procedure TNotifierForm.CreateHandle;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if lblTitle.Font.IsDefault then
|
|
||||||
lblTitle.Font.Style := [fsBold];
|
|
||||||
if lblText.Font.Color = clDefault then
|
if lblText.Font.Color = clDefault then
|
||||||
lblText.Font.Color := clInfoText;
|
lblText.Font.Color := clInfoText;
|
||||||
if lblTitle.Font.Color = clDefault then
|
if lblTitle.Font.Color = clDefault then
|
||||||
@ -303,10 +303,11 @@ end;
|
|||||||
* Utilized for events that hide the form, such as clicking on it
|
* Utilized for events that hide the form, such as clicking on it
|
||||||
*******************************************************************}
|
*******************************************************************}
|
||||||
procedure TNotifierForm.HideForm(Sender: TObject);
|
procedure TNotifierForm.HideForm(Sender: TObject);
|
||||||
Var NoValue :TCloseAction;
|
Var
|
||||||
|
NoValue :TCloseAction;
|
||||||
begin
|
begin
|
||||||
if Assigned(OnClose) then
|
if Assigned(OnClose) then
|
||||||
OnClose(Self,NoValue);
|
OnClose(Self, NoValue);
|
||||||
Hide;
|
Hide;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -329,12 +330,20 @@ begin
|
|||||||
else
|
else
|
||||||
IconAdjust := 0;
|
IconAdjust := 0;
|
||||||
|
|
||||||
|
if (BtnX <> nil) then
|
||||||
|
begin
|
||||||
|
BtnX.Left := Width - (btnSize + Scale96ToForm(5));
|
||||||
|
BtnX.Top := spc;
|
||||||
|
BtnX.Width := btnSize;
|
||||||
|
BtnX.Height := btnSize;
|
||||||
|
end;
|
||||||
|
|
||||||
if (lblTitle <> nil) then
|
if (lblTitle <> nil) then
|
||||||
begin
|
begin
|
||||||
lblTitle.Left := IconAdjust + spc;
|
lblTitle.Left := IconAdjust + spc;
|
||||||
lblTitle.Top := spc;
|
lblTitle.Top := spc;
|
||||||
lblTitle.AutoSize := false;
|
lblTitle.AutoSize := false;
|
||||||
lblTitle.Constraints.MaxWidth := Width - (lblTitle.Left + spc);
|
lblTitle.Constraints.MaxWidth := Width - (lblTitle.Left + spc + btnsize + spc);
|
||||||
lblTitle.AutoSize := true;
|
lblTitle.AutoSize := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -345,14 +354,6 @@ begin
|
|||||||
lblText.Width := Width - (lblText.Left + spc);
|
lblText.Width := Width - (lblText.Left + spc);
|
||||||
lblText.Height := Height - (lblText.Top + spc);
|
lblText.Height := Height - (lblText.Top + spc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (BtnX <> nil) then
|
|
||||||
begin
|
|
||||||
BtnX.Left := Width - (btnSize + Scale96ToForm(5));
|
|
||||||
BtnX.Top := spc;
|
|
||||||
BtnX.Width := btnSize;
|
|
||||||
BtnX.Height := btnSize;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPopupNotifier }
|
{ TPopupNotifier }
|
||||||
|
Loading…
Reference in New Issue
Block a user