gtk intf: set min constraints for controls to 1x1

git-svn-id: trunk@12676 -
This commit is contained in:
mattias 2007-11-01 12:49:24 +00:00
parent 6b5f9e4f97
commit 7a6eecdba3
2 changed files with 8 additions and 2 deletions

View File

@ -2577,6 +2577,12 @@ var
''); '');
{$ENDIF} {$ENDIF}
end; end;
// apply the constraints
NewWidth:=ConstraintWidth(NewWidth);
NewHeight:=ConstraintHeight(NewHeight);
NewRight:=NewLeft+NewWidth;
NewBottom:=NewTop+NewHeight;
// set the new bounds // set the new bounds
if (Control.Left <> NewLeft) or (Control.Top <> NewTop) if (Control.Left <> NewLeft) or (Control.Top <> NewTop)

View File

@ -564,8 +564,8 @@ var
begin begin
Result:=true; Result:=true;
if Constraints is TSizeConstraints then begin if Constraints is TSizeConstraints then begin
MinWidth := 0; MinWidth := 1;
MinHeight := 0; MinHeight := 1;
MaxWidth:=0; MaxWidth:=0;
MaxHeight:=0; MaxHeight:=0;
SizeConstraints:=TSizeConstraints(Constraints); SizeConstraints:=TSizeConstraints(Constraints);