mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 15:41:55 +00:00
Ignore the frame origin when computing the bounds.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25293 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d8d13297cb
commit
1a3c5ae5fc
2 changed files with 35 additions and 27 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-06-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSView.m (-setBoundsRotation:): Ignore the frame origin
|
||||||
|
when computing the bounds.
|
||||||
|
* Source/NSView.m (-drawPageBorderWithSize:): Remove test code
|
||||||
|
accidentally introduced in last change.
|
||||||
|
|
||||||
2007-06-26 Fred Kiefer <FredKiefer@gmx.de>
|
2007-06-26 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSView.h: Add new MacOSX methods.
|
* Headers/AppKit/NSView.h: Add new MacOSX methods.
|
||||||
|
|
|
@ -1001,9 +1001,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
if (_bounds.size.width == 0)
|
if (_bounds.size.width == 0)
|
||||||
{
|
{
|
||||||
if (_frame.size.width == 0)
|
if (_frame.size.width == 0)
|
||||||
sx = 1;
|
sx = 1;
|
||||||
else
|
else
|
||||||
sx = FLT_MAX;
|
sx = FLT_MAX;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1013,9 +1013,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
if (_bounds.size.height == 0)
|
if (_bounds.size.height == 0)
|
||||||
{
|
{
|
||||||
if (_frame.size.height == 0)
|
if (_frame.size.height == 0)
|
||||||
sy = 1;
|
sy = 1;
|
||||||
else
|
else
|
||||||
sy = FLT_MAX;
|
sy = FLT_MAX;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1332,7 +1332,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
if (angle != oldAngle)
|
if (angle != oldAngle)
|
||||||
{
|
{
|
||||||
NSAffineTransform *matrix;
|
NSAffineTransform *matrix;
|
||||||
|
NSRect frame = _frame;
|
||||||
|
|
||||||
|
frame.origin = NSMakePoint(0, 0);
|
||||||
if (_coordinates_valid)
|
if (_coordinates_valid)
|
||||||
{
|
{
|
||||||
(*invalidateImp)(self, invalidateSel);
|
(*invalidateImp)(self, invalidateSel);
|
||||||
|
@ -1342,7 +1344,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
// Adjust bounds
|
// Adjust bounds
|
||||||
matrix = [_boundsMatrix copy];
|
matrix = [_boundsMatrix copy];
|
||||||
[matrix invert];
|
[matrix invert];
|
||||||
[matrix boundingRectFor: _frame result: &_bounds];
|
[matrix boundingRectFor: frame result: &_bounds];
|
||||||
RELEASE(matrix);
|
RELEASE(matrix);
|
||||||
|
|
||||||
if (_post_bounds_changes)
|
if (_post_bounds_changes)
|
||||||
|
@ -3873,7 +3875,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
|
|
||||||
- (void) drawPageBorderWithSize: (NSSize)borderSize
|
- (void) drawPageBorderWithSize: (NSSize)borderSize
|
||||||
{
|
{
|
||||||
NSFrameRect(NSMakeRect(0, 0, borderSize.width, borderSize.height));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) drawSheetBorderWithSize: (NSSize)borderSize
|
- (void) drawSheetBorderWithSize: (NSSize)borderSize
|
||||||
|
@ -4211,13 +4212,13 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
NSView *nextKeyView = nil;
|
NSView *nextKeyView = nil;
|
||||||
|
|
||||||
if ([aDecoder containsValueForKey: @"NSFrame"])
|
if ([aDecoder containsValueForKey: @"NSFrame"])
|
||||||
{
|
{
|
||||||
_frame = [aDecoder decodeRectForKey: @"NSFrame"];
|
_frame = [aDecoder decodeRectForKey: @"NSFrame"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_frame = NSZeroRect;
|
_frame = NSZeroRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
_bounds.origin = NSZeroPoint; // Set bounds rectangle
|
_bounds.origin = NSZeroPoint; // Set bounds rectangle
|
||||||
_bounds.size = _frame.size;
|
_bounds.size = _frame.size;
|
||||||
|
@ -4244,23 +4245,23 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
prevKeyView = [aDecoder decodeObjectForKey: @"NSPreviousKeyView"];
|
prevKeyView = [aDecoder decodeObjectForKey: @"NSPreviousKeyView"];
|
||||||
nextKeyView = [aDecoder decodeObjectForKey: @"NSNextKeyView"];
|
nextKeyView = [aDecoder decodeObjectForKey: @"NSNextKeyView"];
|
||||||
if (nextKeyView != nil)
|
if (nextKeyView != nil)
|
||||||
{
|
{
|
||||||
[self setNextKeyView: nextKeyView];
|
[self setNextKeyView: nextKeyView];
|
||||||
}
|
}
|
||||||
if (prevKeyView != nil)
|
if (prevKeyView != nil)
|
||||||
{
|
{
|
||||||
[self setPreviousKeyView: prevKeyView];
|
[self setPreviousKeyView: prevKeyView];
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSvFlags"])
|
if ([aDecoder containsValueForKey: @"NSvFlags"])
|
||||||
{
|
{
|
||||||
int vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
|
int vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
|
||||||
|
|
||||||
// We are lucky here, Apple use the same constants
|
// We are lucky here, Apple use the same constants
|
||||||
// in the lower bits of the flags
|
// in the lower bits of the flags
|
||||||
[self setAutoresizingMask: vFlags & 0x3F];
|
[self setAutoresizingMask: vFlags & 0x3F];
|
||||||
[self setAutoresizesSubviews: ((vFlags & 0x100) == 0x100)];
|
[self setAutoresizesSubviews: ((vFlags & 0x100) == 0x100)];
|
||||||
[self setHidden: ((vFlags & 0x80000000) == 0x80000000)];
|
[self setHidden: ((vFlags & 0x80000000) == 0x80000000)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// iterate over subviews and put them into the view...
|
// iterate over subviews and put them into the view...
|
||||||
subs = [aDecoder decodeObjectForKey: @"NSSubviews"];
|
subs = [aDecoder decodeObjectForKey: @"NSSubviews"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue