* Source/NSView.m (-setBoundsSize:): Adjust the origin as well.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33717 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-08-11 08:14:53 +00:00
parent 9d79d0c978
commit 4e05c96c6f
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2011-08-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSView.m (-setBoundsSize:): Adjust the origin as well.
2011-08-04 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (+initialize): Don't create the default menu

View file

@ -1508,6 +1508,9 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
[_boundsMatrix scaleTo: scale.width : scale.height];
if (!_is_rotated_from_base)
{
scale = _computeScale(_bounds.size, newSize);
_bounds.origin.x = _bounds.origin.x / scale.width;
_bounds.origin.y = _bounds.origin.y / scale.height;
_bounds.size = newSize;
}
else
@ -1593,7 +1596,7 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
}
[_boundsMatrix scaleXBy: newSize.width yBy: newSize.height];
// Adjust bounds
_bounds.origin.x = _bounds.origin.x / newSize.width;
_bounds.origin.x = _bounds.origin.x / newSize.width;
_bounds.origin.y = _bounds.origin.y / newSize.height;
_bounds.size.width = _bounds.size.width / newSize.width;
_bounds.size.height = _bounds.size.height / newSize.height;