mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
update label size on font change if autosize is set to true (0010846)
git-svn-id: trunk@14217 -
This commit is contained in:
parent
754b2e921d
commit
12392bd167
@ -62,6 +62,9 @@ end;
|
||||
procedure TCustomLabel.FontChanged(Sender: TObject);
|
||||
begin
|
||||
inherited FontChanged(Sender);
|
||||
InvalidatePreferredSize;
|
||||
if (Parent<>nil) and Parent.AutoSize then
|
||||
Parent.AdjustSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
|
||||
@ -141,7 +144,7 @@ begin
|
||||
FFocusControl.SetFocus;
|
||||
end;
|
||||
|
||||
Function TCustomLabel.GetAlignment : TAlignment;
|
||||
function TCustomLabel.GetAlignment : TAlignment;
|
||||
begin
|
||||
Result := FAlignment;
|
||||
end;
|
||||
@ -151,9 +154,9 @@ begin
|
||||
Result := Caption;
|
||||
end;
|
||||
|
||||
Procedure TCustomLabel.SetShowAccelChar(Value : Boolean);
|
||||
procedure TCustomLabel.SetShowAccelChar(Value : Boolean);
|
||||
begin
|
||||
If FShowAccelChar <> Value then
|
||||
if FShowAccelChar <> Value then
|
||||
begin
|
||||
FShowAccelChar := Value;
|
||||
Invalidate;
|
||||
@ -176,7 +179,7 @@ begin
|
||||
AdjustFontForOptimalFill;
|
||||
end;
|
||||
|
||||
Function TCustomLabel.GetShowAccelChar : Boolean;
|
||||
function TCustomLabel.GetShowAccelChar : Boolean;
|
||||
begin
|
||||
Result := FShowAccelChar;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user