From e4afa947d260817a0e8842532e87e6865d8e08ba Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 22 Jul 2006 21:00:58 +0000 Subject: [PATCH] Zoom now works horizontally. This also gets around the problems with zoom when auto resizing. --- macosx/Controller.m | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 736954b30..235097184 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2112,21 +2112,18 @@ static void sleepCallBack(void * controller, io_service_t y, - (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame { - return [self windowFrameForAmount: [fFilteredTorrents count]]; + NSRect frame = [fDefaults boolForKey: @"AutoSize"] ? [window frame] + : [self windowFrameForAmount: [fFilteredTorrents count]]; + + frame.size.width = [fDefaults boolForKey: @"SmallView"] ? [fWindow minSize].width : 450.0; + return frame; } - (void) setAutoSize: (NSNotification *) notification { - #warning will not work because of sheets - //[[fWindow standardWindowButton: NSWindowZoomButton] setEnabled: ![fDefaults boolForKey: @"AutoSize"]]; [self setWindowSizeToFit]; } -- (BOOL) windowShouldZoom: (NSWindow *) sender toFrame: (NSRect) newFrame -{ - return ![fDefaults boolForKey: @"AutoSize"]; -} - - (void) setWindowSizeToFit { if ([fDefaults boolForKey: @"AutoSize"])