lcl: TButtonPanel: fixed computing preferredsize

git-svn-id: branches/fixes_1_4@48632 -
This commit is contained in:
mattias 2015-04-05 08:38:47 +00:00
parent 464c53b4eb
commit 964cbf8e21
3 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<MinorVersionNr Value="4"/>
<BuildNr Value="3"/>
<BuildNr Value="4"/>
<CharSet Value="04B0"/>
<StringTable ProductName="Lazarus IDE" ProductVersion=""/>
</VersionInfo>
@ -70,6 +70,7 @@
<Unit0>
<Filename Value="lazarus.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Lazarus"/>
</Unit0>
<Unit1>
<Filename Value="frames/oi_options.pas"/>
@ -302,7 +303,6 @@
<Unit38>
<Filename Value="main.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Main"/>
</Unit38>
<Unit39>
<Filename Value="../designer/designer.pp"/>

Binary file not shown.

View File

@ -620,6 +620,7 @@ begin
CtrlPrefWidth:=0;
CtrlPrefHeight:=0;
AControl.GetPreferredSize(CtrlPrefWidth,CtrlPrefHeight);
//debugln(['TCustomButtonPanel.CalculatePreferredSize ',DbgSName(AControl),' ',CtrlPrefHeight]);
if Align in [alLeft,alRight] then
begin
inc(MinHeight,CtrlPrefHeight);
@ -642,8 +643,8 @@ begin
else
inc(MinHeight,FBevel.Height+Spacing);
end;
PreferredWidth:=Max(PreferredWidth,MinWidth);
PreferredHeight:=Max(PreferredHeight,MinHeight);
PreferredWidth:=MinWidth;
PreferredHeight:=MinHeight;
//debugln(['TCustomButtonPanel.CalculatePreferredSize ',DbgSName(Self),' ',PreferredWidth,'x',PreferredHeight]);
end;