Changeset 60 for trunk/Cocoa/Pester/Source/PSMovieAlertController.m
- Timestamp:
- 01/05/03 23:02:48 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSMovieAlertController.m
r53 r60 12 12 #import "NSMovie-NJRExtensions.h" 13 13 #import <QuickTime/Movies.h> 14 15 // XXX if you specify a truly tiny movie, obey the minimum window size to compensate16 14 17 15 @implementation PSMovieAlertController … … 36 34 } 37 35 delay = (GetMovieDuration((Movie)theMovie) - GetMovieTime((Movie)theMovie, NULL)) / (double)GetMovieTimeScale((Movie)theMovie); 36 // XXX should use a timebase callback for this instead (see NJRQTMediaPopUpButton); also, use QuickTimeÕs built-in loop functionality instead of rolling our own? 38 37 [self performSelector: @selector(play) withObject: nil afterDelay: delay inModes: [NSArray arrayWithObject: NSDefaultRunLoopMode]]; 39 38 } … … 52 51 float magnification = 1.0; 53 52 NSSize movieSize; 53 NSSize minSize = [window minSize]; 54 float windowFrameHeight = [window frame].size.height - [[window contentView] frame].size.height; 54 55 NSRect frame; 55 screenRect.size.height -= [window frame].size.height - [[window contentView] frame].size.height; // account for height of window frame 56 screenRect.size.height -= windowFrameHeight; 57 minSize.height -= windowFrameHeight; 56 58 while (1) { 57 59 movieSize = [movieView sizeForMagnification: magnification]; … … 62 64 break; 63 65 } 66 if (movieSize.width < minSize.width) movieSize.width = minSize.width; 67 if (movieSize.height < minSize.height) movieSize.width = minSize.height; 64 68 [window setContentSize: movieSize]; 65 69 [window center];
Note:
See TracChangeset
for help on using the changeset viewer.