* NSView.m resizeSubviewsWithOldSize: check whether view has ever been

rotated (per 4.2 docs).
	* NSStringDrawing.m sizeWithAttributes: fix minor bug introduced while
	optimizing tab calc.
	* NSCell.m: drawInteriorWithFrame: minor optimization


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3379 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Felipe A. Rodriguez 1998-12-03 21:23:58 +00:00
parent 99e67e6618
commit b57813676d
6 changed files with 33 additions and 19 deletions

View file

@ -1,3 +1,11 @@
Thu Dec 3 1998 Felipe A. Rodriguez <far@ix.netcom.com>
* NSView.m resizeSubviewsWithOldSize: check whether view has ever been
rotated (per 4.2 docs).
* NSStringDrawing.m sizeWithAttributes: fix minor bug introduced while
optimizing tab calc.
* NSCell.m: drawInteriorWithFrame: minor optimization
Tue Dec 3 7:00:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSApplication.m: Fixed include for GNUServicesManager.h

View file

@ -871,7 +871,8 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
// Tell the windows to hide
for (i = 0, count = [window_list count]; i < count; i++)
[[window_list objectAtIndex:i] performHide:sender];
// [[window_list objectAtIndex:i] performHide:sender];
[[window_list objectAtIndex:i] orderOut:sender];
app_is_hidden = YES;
// notify that we did hide
@ -889,7 +890,8 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
int i, count;
// Tell windows to unhide
for (i = 0, count = [window_list count]; i < count; i++)
[[window_list objectAtIndex:i] performUnhide:sender];
// [[window_list objectAtIndex:i] performUnhide:sender];
[[window_list objectAtIndex:i] orderFront:sender];
// TODO: unhide the menu

View file

@ -463,7 +463,7 @@ NSString* _string;
break;
}
case NSImageCellType:
[self _displayImage:[self image] inFrame:cellFrame];
[self _displayImage:cell_image inFrame:cellFrame];
break;
case NSNullCellType:
break;

View file

@ -238,6 +238,7 @@ static NSDictionary* nsmapping = nil;
{
NSImage* image = [[[NSImage alloc] initByReferencingFile:path]
autorelease];
if (image)
[image setName: [[path lastPathComponent]
stringByDeletingPathExtension]];

View file

@ -41,6 +41,7 @@ NSFont *font;
const char *str = [self cString];
int i = 0, j = TABWIDTH;
static float tabSize;
float tabSumSize;
static float pointSize;
static NSFont *lastFont = nil;
@ -60,12 +61,14 @@ static NSFont *lastFont = nil;
if(font != lastFont) // update font info
{ // if font changes
tabSize = (float)i * [font widthOfString:@"\t"];
tabSize = [font widthOfString:@"\t"];
lastFont = font;
pointSize = [font pointSize];
}
tabSumSize = (float)i * tabSize;
return NSMakeSize(([font widthOfString:self] + tabSize), pointSize);
return NSMakeSize(([font widthOfString:self] + tabSumSize), pointSize);
}
@end

View file

@ -611,12 +611,12 @@ PSMatrix* matrix;
post_bounds_changes = flag;
}
- (void)resizeSubviewsWithOldSize:(NSSize)oldSize
{
id e, o;
if (![self autoresizesSubviews]) // Are we suppose to
return; // resize our subviews?
- (void)resizeSubviewsWithOldSize:(NSSize)oldSize // resize subviews only
{ // if we are supposed
id e, o; // to and we have never
// been rotated
if (![self autoresizesSubviews] && !is_rotated_from_base)
return;
e = [sub_views objectEnumerator];
o = [e nextObject];
@ -719,13 +719,13 @@ id e, o;
}
- (void)displayIfNeededInRectIgnoringOpacity:(NSRect)aRect
{ // of our sub views if
int i = 0, count; // any part of self has
// been marked to be in
for (count = [sub_views count]; i < count; ++i) // need of display with
{ // setNeedsDisplay or
NSView* subview = [sub_views objectAtIndex:i]; // stNeedsDisplayInRect
{ // display self and all
int i = 0, count; // of our sub views if
// any part of self has
for (count = [sub_views count]; i < count; ++i) // been marked to be in
{ // need of display with
NSView* subview = [sub_views objectAtIndex:i]; // setNeedsDisplay or
// stNeedsDisplayInRect
if(subview->needs_display)
{
NSRect rect = subview->invalidatedRectangle;
@ -1097,7 +1097,7 @@ TrackingRectangle *m;
}
- (void)dragImage:(NSImage *)anImage // initiate a dragging
at:(NSPoint)viewLocation // session
at:(NSPoint)viewLocation // session (backend)
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard