LCL: TCustomLabel.CalculatePreferredSize: consider constraints

git-svn-id: trunk@26528 -
This commit is contained in:
mattias 2010-07-08 15:00:20 +00:00
parent af31f6d34d
commit 959cda8c75
2 changed files with 2 additions and 0 deletions

View File

@ -6578,6 +6578,7 @@ Begin
{$IFDEF IDE_DEBUG} {$IFDEF IDE_DEBUG}
writeln('[TSourceNotebook.NewFile] D '); writeln('[TSourceNotebook.NewFile] D ');
{$ENDIF} {$ENDIF}
//debugln(['TSourceNotebook.NewFile ',NewShortName,' ',ASource.Filename]);
Result.PageName:= Manager.FindUniquePageName(NewShortName, Result); Result.PageName:= Manager.FindUniquePageName(NewShortName, Result);
UpdatePageNames; UpdatePageNames;
UpdateProjectFiles; UpdateProjectFiles;

View File

@ -37,6 +37,7 @@ begin
AWidth:=Width AWidth:=Width
else else
AWidth:=10000; AWidth:=10000;
AWidth:=Constraints.MinMaxWidth(AWidth);
CalculateSize(AWidth,PreferredWidth,PreferredHeight); CalculateSize(AWidth,PreferredWidth,PreferredHeight);
end; end;