Fixed bug in inverted toolbar behaviour so it restores the content view to the correct width.

CQTexperiment
vspader 2008-01-23 03:55:20 +00:00
parent d230f30a09
commit ef259a374f
3 changed files with 6 additions and 3 deletions

View File

@ -12,6 +12,7 @@
@interface InvertedToolbarWindow : NSWindow {
BOOL contentHidden;
double contentHeight;
double contentWidth;
}
@end

View File

@ -25,16 +25,19 @@
newFrame.origin.y -= contentHeight;
newFrame.size.height += contentHeight;
[[self contentView] resizeSubviewsWithOldSize:NSMakeSize(contentWidth, 0)];
[self setFrame:newFrame display:YES animate:YES];
[[self contentView] setAutoresizesSubviews:YES];
[self setShowsResizeIndicator:YES];
[[self contentView] setAutoresizesSubviews:YES];
}
else //Hide
{
NSRect newFrame = [self frame];
contentWidth = [[self contentView] bounds].size.width;
contentHeight = [[self contentView] bounds].size.height;
newFrame.origin.y += contentHeight;
@ -43,7 +46,6 @@
[self setShowsResizeIndicator:NO];
[[self contentView] setAutoresizesSubviews:NO];
[self setFrame:newFrame display:YES animate:YES];
}

Binary file not shown.