diff --git a/AppKit/CPWindow/_CPStandardWindowView.j b/AppKit/CPWindow/_CPStandardWindowView.j index 9d8fd7147..3b4b13908 100644 --- a/AppKit/CPWindow/_CPStandardWindowView.j +++ b/AppKit/CPWindow/_CPStandardWindowView.j @@ -152,38 +152,6 @@ var STANDARD_GRADIENT_HEIGHT = 41.0; return _CPStandardWindowViewDividerBackgroundColor; } -- (CGRect)contentRectForFrameRect:(CGRect)aFrameRect -{ - var contentRect = [[self class] contentRectForFrameRect:aFrameRect], - theToolbar = [[self window] toolbar]; - - if ([theToolbar isVisible]) - { - var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); - - contentRect.origin.y += toolbarHeight; - contentRect.size.height -= toolbarHeight; - } - - return contentRect; -} - -- (CGRect)frameRectForContentRect:(CGRect)aContentRect -{ - var frameRect = [[self class] frameRectForContentRect:aContentRect], - theToolbar = [[self window] toolbar]; - - if ([theToolbar isVisible]) - { - var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); - - frameRect.origin.y -= toolbarHeight; - frameRect.size.height += toolbarHeight; - } - - return frameRect; -} - - (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask { self = [super initWithFrame:aFrame styleMask:aStyleMask]; diff --git a/AppKit/CPWindow/_CPWindowView.j b/AppKit/CPWindow/_CPWindowView.j index ae02622cf..207a3456e 100644 --- a/AppKit/CPWindow/_CPWindowView.j +++ b/AppKit/CPWindow/_CPWindowView.j @@ -76,12 +76,34 @@ var _CPWindowViewResizeIndicatorImage = nil; - (CGRect)contentRectForFrameRect:(CGRect)aFrameRect { - return [[self class] contentRectForFrameRect:aFrameRect]; + var contentRect = [[self class] contentRectForFrameRect:aFrameRect], + theToolbar = [[self window] toolbar]; + + if ([theToolbar isVisible]) + { + var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); + + contentRect.origin.y += toolbarHeight; + contentRect.size.height -= toolbarHeight; + } + + return contentRect; } - (CGRect)frameRectForContentRect:(CGRect)aContentRect { - return [[self class] frameRectForContentRect:aContentRect]; + var frameRect = [[self class] frameRectForContentRect:aContentRect], + theToolbar = [[self window] toolbar]; + + if ([theToolbar isVisible]) + { + var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); + + frameRect.origin.y -= toolbarHeight; + frameRect.size.height += toolbarHeight; + } + + return frameRect; } - (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask