From e1c938bc73510d64b908408bf404eb10a419001e Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 30 Oct 2009 18:35:16 +0000 Subject: [Author: thomasvl] Add a helper for doing view resizing without resizing subviews. Fix the fixed width call to not change the width. Update the unittest to make sure the fixed width call doesn't change the width. R=stuartmorgan,dmaclach DELTA=41 (30 added, 0 deleted, 11 changed) --- AppKit/GTMUILocalizerAndLayoutTweaker.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.h') diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.h b/AppKit/GTMUILocalizerAndLayoutTweaker.h index abcb758..3c5c864 100644 --- a/AppKit/GTMUILocalizerAndLayoutTweaker.h +++ b/AppKit/GTMUILocalizerAndLayoutTweaker.h @@ -42,7 +42,7 @@ // This checks to see if |view| implements @selector(sizeToFit) and calls it. // It then checks the class of |view| and does some fixup for known issues -// where sizeToFit doesn't product a view that meets UI guidelines. +// where sizeToFit doesn't produce a view that meets UI guidelines. // Returns the amount the view changed in size. + (NSSize)sizeToFitView:(NSView *)view; @@ -60,13 +60,15 @@ + (void)wrapButtonTitleForWidth:(NSButton *)button; + (void)wrapRadioGroupForWidth:(NSMatrix *)radioGroup; -// Resizes |window| by |delta| without letting the subviews of |window| get +// Resizes |window| or |view| by |delta| without letting the subviews get // resized. Useful when you've done manual tweaking by things like -// +sizeToFitFixedWidthTextField. The window's origin is not adjusted. Passes -// |NO| to for -setFrame:display:'s |displayViews| flag on the assumptions -// the caller is doing all the invals/updates needed. +// +sizeToFitFixedWidthTextField. The origin is not adjusted. For windows, +// passes |NO| to for -setFrame:display:'s |displayViews| flag on the +// assumptions the caller is doing all the invals/updates needed. + (void)resizeWindowWithoutAutoResizingSubViews:(NSWindow*)window delta:(NSSize)delta; ++ (void)resizeViewWithoutAutoResizingSubViews:(NSView*)view + delta:(NSSize)delta; @end -- cgit v1.2.3