mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:31:29 +02:00
LCL: ignoring constraints during loading, they are applied in Loaded
git-svn-id: trunk@10625 -
This commit is contained in:
parent
84d5619a1e
commit
557dc2efad
@ -76,6 +76,8 @@ end;
|
||||
|
||||
function TSizeConstraints.EffectiveMinWidth: integer;
|
||||
begin
|
||||
if csLoading in Control.ComponentState then
|
||||
exit(0);
|
||||
if (MinWidth>MinInterfaceWidth) then begin
|
||||
Result:=MinWidth;
|
||||
if (MaxInterfaceWidth>0) and (MaxInterfaceWidth<MinWidth) then
|
||||
@ -86,6 +88,8 @@ end;
|
||||
|
||||
function TSizeConstraints.EffectiveMinHeight: integer;
|
||||
begin
|
||||
if csLoading in Control.ComponentState then
|
||||
exit(0);
|
||||
if (MinHeight>MinInterfaceHeight) then begin
|
||||
Result:=MinHeight;
|
||||
if (MaxInterfaceHeight>0) and (Result>MaxInterfaceHeight) then
|
||||
@ -99,6 +103,8 @@ end;
|
||||
// A zero value is interpreted as unconstraint.
|
||||
function TSizeConstraints.EffectiveMaxWidth: integer;
|
||||
begin
|
||||
if csLoading in Control.ComponentState then
|
||||
exit(0);
|
||||
if (MaxInterfaceWidth>0) and
|
||||
((MaxWidth=0) or (MaxInterfaceWidth<MaxWidth)) then
|
||||
Result := MaxInterfaceWidth
|
||||
@ -113,6 +119,8 @@ end;
|
||||
// A zero value is interpreted as unconstraint.
|
||||
function TSizeConstraints.EffectiveMaxHeight: integer;
|
||||
begin
|
||||
if csLoading in Control.ComponentState then
|
||||
exit(0);
|
||||
if (MaxInterfaceHeight>0) and
|
||||
((MaxHeight=0) or (MaxInterfaceHeight<MaxHeight)) then
|
||||
Result := MaxInterfaceHeight
|
||||
|
Loading…
Reference in New Issue
Block a user