From ee8fef4e8564db2ac20138c790ccb85b362f9165 Mon Sep 17 00:00:00 2001 From: saikat Date: Sat, 17 Oct 2009 15:54:20 -0700 Subject: [PATCH] Fixes to autosizing behavior for CPMenu - closes issue #270 --- AppKit/CPMenu.j | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AppKit/CPMenu.j b/AppKit/CPMenu.j index 41c8689e7..1636e7a8f 100644 --- a/AppKit/CPMenu.j +++ b/AppKit/CPMenu.j @@ -1970,11 +1970,12 @@ var _CPMenuBarWindowBackgroundColor = nil, } } -- (void)setFrameSize:(CGSize)aSize +- (void)setFrame:(CGRect)aRect { - [super setFrameSize:aSize]; - - [self tile]; + var oldSize = CGSizeMakeCopy([self frame].size); + [super setFrame:aRect]; + if (!CGSizeEqualToSize(oldSize, [self frame].size)) + [self tile]; } @end