mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:10:47 +00:00
Applied view resizing patches.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8345 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dff043a22a
commit
d878c1bc44
2 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2000-12-17 Georg Fleischmann
|
||||||
|
|
||||||
|
* gui/Source/NSView.m ([NSView -setFrameSize:]):
|
||||||
|
scale bounds, if necessary
|
||||||
|
* gui/Source/NSView.m ([NSView -scaleUnitSquareSize:]):
|
||||||
|
scale from bounds instead of frame (like OpenStep)
|
||||||
|
|
||||||
Sun Dec 17 14:32:11 2000 Nicola Pero <n.pero@mi.flashnet.it>
|
Sun Dec 17 14:32:11 2000 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Source/NSCell.m ([-_nonAutoreleasedTypingAttributes]): New
|
* Source/NSCell.m ([-_nonAutoreleasedTypingAttributes]): New
|
||||||
|
|
|
@ -699,7 +699,18 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
{
|
{
|
||||||
(*invalidateImp)(self, invalidateSel);
|
(*invalidateImp)(self, invalidateSel);
|
||||||
}
|
}
|
||||||
_frame.size = _bounds.size = newSize;
|
|
||||||
|
if (_is_rotated_or_scaled_from_base)
|
||||||
|
{
|
||||||
|
float sx = _bounds.size.width / _frame.size.width;
|
||||||
|
float sy = _bounds.size.height / _frame.size.height;
|
||||||
|
|
||||||
|
_frame.size = newSize;
|
||||||
|
_bounds.size.width = _frame.size.width * sx;
|
||||||
|
_bounds.size.height = _frame.size.height * sy;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_frame.size = _bounds.size = newSize;
|
||||||
|
|
||||||
[self resizeSubviewsWithOldSize: old_size];
|
[self resizeSubviewsWithOldSize: old_size];
|
||||||
if (_post_frame_changes)
|
if (_post_frame_changes)
|
||||||
|
@ -761,8 +772,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
{
|
{
|
||||||
(*invalidateImp)(self, invalidateSel);
|
(*invalidateImp)(self, invalidateSel);
|
||||||
}
|
}
|
||||||
_bounds.size.width = _frame.size.width / newSize.width;
|
_bounds.size.width = _bounds.size.width / newSize.width;
|
||||||
_bounds.size.height = _frame.size.height / newSize.height;
|
_bounds.size.height = _bounds.size.height / newSize.height;
|
||||||
|
|
||||||
_is_rotated_or_scaled_from_base = YES;
|
_is_rotated_or_scaled_from_base = YES;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue