diff --git a/lcl/include/sizeconstraints.inc b/lcl/include/sizeconstraints.inc index 12a292ea2a..0bd79eb73c 100644 --- a/lcl/include/sizeconstraints.inc +++ b/lcl/include/sizeconstraints.inc @@ -87,22 +87,32 @@ begin Result:=MinInterfaceHeight; end; +// EffectiveMaxWidth is the minumum of MaxWidth and MaxInterfaceWidth, +// but is at least MinInterfaceWidth. +// A value of zero is interpreted as unconstraint. function TSizeConstraints.EffectiveMaxWidth: integer; begin - if (MaxWidth0) and + ((MaxWidth=0) or (MaxInterfaceWidth0) and (MinInterfaceWidth>0) and (Result0) and + ((MaxHeight=0) or (MaxInterfaceHeight0) and (MinInterfaceHeight>0) and (Result