<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.SystemVersion">9J61</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
- <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.AppKitVersion">949.46</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
viewSize.width = viewSize.width - (viewSize.width - imageScaledSize.width);
viewSize.height = viewSize.height - (viewSize.height - imageScaledSize.height);
[fPreviewImage setSize: viewSize];
- [fPictureView setFrameSize: viewSize];
+ //[fPictureView setFrameSize: viewSize];
}
+
else
{
[fPreviewImage setSize: imageScaledSize];
viewSize.height = viewSize.height - (viewSize.height - imageScaledSize.height);
[self setViewSize:viewSize];
+ /* special case for scaleToScreen */
+ if (scaleToScreen == YES)
+ {
+ [fPreviewImage setSize: viewSize];
+ [fPictureView setImage: fPreviewImage];
+ }
+
NSString *scaleString;
if( imageScaledSize.height > [fPictureView frame].size.height)
else
{
[[fPictureControlBox animator] setHidden: YES];
+ [self stopHudTimer];
}
}
/* make sure we are set to a still preview */
[self pictureSliderChanged:nil];
- //[fPreviewWindow setAcceptsMouseMovedEvents:NO];
[fFullScreenWindow setAcceptsMouseMovedEvents:YES];
// Assumes resizeSheetForViewSize: has already been called.
//
- (void)setViewSize: (NSSize)viewSize
-{
+{
+ /* special case for scaleToScreen */
+ if (scaleToScreen == YES)
+ {
+ /* for scaleToScreen, we expand the fPictureView to fit the entire screen */
+ NSSize areaSize = [fPictureViewArea frame].size;
+ CGFloat viewSizeAspect = viewSize.width / viewSize.height;
+ if (viewSizeAspect > 1.0) // we are wider than taller, so expand the width to fill the area and scale the height
+ {
+ viewSize.width = areaSize.width;
+ viewSize.height = viewSize.width / viewSizeAspect;
+ }
+ else
+ {
+ viewSize.height = areaSize.height;
+ viewSize.width = viewSize.height * viewSizeAspect;
+ }
+
+ }
+
[fPictureView setFrameSize:viewSize];
- // center it vertically and horizontally
+ // center it vertically and horizontally
NSPoint origin = [fPictureViewArea frame].origin;
origin.y += ([fPictureViewArea frame].size.height -
[fPictureView frame].size.height) / 2.0;
-
- origin.x += ([fPictureViewArea frame].size.width -
- [fPictureView frame].size.width) / 2.0;
+
+ origin.x += ([fPictureViewArea frame].size.width -
+ [fPictureView frame].size.width) / 2.0;
[fPictureView setFrameOrigin:origin];
controlboxorigin.y += 100;
controlboxorigin.x += ([fPictureViewArea frame].size.width -
- [fPictureControlBox frame].size.width) / 2.0;
-
+ [fPictureControlBox frame].size.width) / 2.0;
+
/* origin should be rounded to integer otherwise font/antialiasing
* may be blurry.