mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
lcl: TButtonPanel: fixed computing preferredsize
git-svn-id: trunk@48631 -
This commit is contained in:
parent
483c6ba2cc
commit
1ff83d795c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user