diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-03-17 14:05:38 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-03-17 14:05:38 +0000 |
commit | 959bac16835a8676f71bf440cea8344a32d6c498 (patch) | |
tree | 79c66bc598106f59373e70967339078d4c98d46a /AppKit/GTMUILocalizerAndLayoutTweaker.m | |
parent | fb90ee6c273905ea96d551631b6ef9adbd4aefd6 (diff) |
[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)
Diffstat (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m')
-rw-r--r-- | AppKit/GTMUILocalizerAndLayoutTweaker.m | 7 |
1 files changed, 5 insertions, 2 deletions
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]; |