From 959bac16835a8676f71bf440cea8344a32d6c498 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 17 Mar 2010 14:05:38 +0000 Subject: [Author: thomasvl] If a width base tweaker is adjusting a window's size with the result, apply the calculations needed for Resolution Independence also. R=avi,dmaclach DELTA=5 (3 added, 0 deleted, 2 changed) --- AppKit/GTMUILocalizerAndLayoutTweaker.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m') diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.m b/AppKit/GTMUILocalizerAndLayoutTweaker.m index 4518ef1..ab61d8e 100644 --- a/AppKit/GTMUILocalizerAndLayoutTweaker.m +++ b/AppKit/GTMUILocalizerAndLayoutTweaker.m @@ -503,12 +503,15 @@ static BOOL IsRightAnchored(NSView *view); if (viewToResize_) { if ([viewToResize_ isKindOfClass:[NSWindow class]]) { NSWindow *window = (NSWindow *)viewToResize_; - NSRect windowFrame = [window frame]; + NSView *contentView = [window contentView]; + NSRect windowFrame = [contentView convertRect:[window frame] + fromView:nil]; windowFrame.size.width += finalDelta; + windowFrame = [contentView convertRect:windowFrame toView:nil]; [window setFrame:windowFrame display:YES]; // For some reason the content view is resizing, but not adjusting its // origin, so correct it manually. - [[window contentView] setFrameOrigin:NSMakePoint(0, 0)]; + [contentView setFrameOrigin:NSMakePoint(0, 0)]; // TODO: should we update min size? } else { NSRect viewFrame = [viewToResize_ frame]; -- cgit v1.2.3