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; FParentFont := False;
Invalidate; Invalidate;
Perform(CM_FONTCHANGED, 0, 0); Perform(CM_FONTCHANGED, 0, 0);
if AutoSize then
begin
InvalidatePreferredSize;
AdjustSize;
end;
end; end;
procedure TControl.ParentFontChanged; procedure TControl.ParentFontChanged;

View File

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