LCL: TControl.FontChanged: moved AutoSize from TWinControl to TControl

git-svn-id: trunk@23367 -
This commit is contained in:
mattias 2010-01-04 12:39:53 +00:00
parent ee54a701ad
commit 5848a2067c
2 changed files with 6 additions and 6 deletions

View File

@ -277,6 +277,11 @@ begin
FParentFont := False;
Invalidate;
Perform(CM_FONTCHANGED, 0, 0);
if AutoSize then
begin
InvalidatePreferredSize;
AdjustSize;
end;
end;
procedure TControl.ParentFontChanged;

View File

@ -4532,15 +4532,10 @@ begin
begin
TWSWinControlClass(WidgetSetClass).SetFont(Self, Font);
Exclude(FWinControlFlags, wcfFontChanged);
if AutoSize then
begin
InvalidatePreferredSize;
AdjustSize;
end;
end
else
Include(FWinControlFlags, wcfFontChanged);
inherited;
inherited FontChanged(Sender);
NotifyControls(CM_PARENTFONTCHANGED);
end;