mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:50:49 +00:00
* 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:
parent
0020bb75e1
commit
55d2d291af
2 changed files with 8 additions and 1 deletions
|
@ -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>
|
2011-08-04 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSMenu.m (+initialize): Don't create the default menu
|
* Source/NSMenu.m (+initialize): Don't create the default menu
|
||||||
|
|
|
@ -1508,6 +1508,9 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
|
||||||
[_boundsMatrix scaleTo: scale.width : scale.height];
|
[_boundsMatrix scaleTo: scale.width : scale.height];
|
||||||
if (!_is_rotated_from_base)
|
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;
|
_bounds.size = newSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1593,7 +1596,7 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
|
||||||
}
|
}
|
||||||
[_boundsMatrix scaleXBy: newSize.width yBy: newSize.height];
|
[_boundsMatrix scaleXBy: newSize.width yBy: newSize.height];
|
||||||
// Adjust bounds
|
// 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.origin.y = _bounds.origin.y / newSize.height;
|
||||||
_bounds.size.width = _bounds.size.width / newSize.width;
|
_bounds.size.width = _bounds.size.width / newSize.width;
|
||||||
_bounds.size.height = _bounds.size.height / newSize.height;
|
_bounds.size.height = _bounds.size.height / newSize.height;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue