<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9052" systemVersion="15B22c" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9052" systemVersion="15B30a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="6300" identifier="xcode"/>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
- <window title="Preview" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="Preview" animationBehavior="default" id="5" userLabel="PreviewPanel">
+ <window title="Preview" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="5" userLabel="PreviewPanel">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="221" y="837" width="500" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
{
[self.window.contentView setWantsLayer:YES];
- self.windowCenterPoint = [self centerPoint];
+ // Read the window center position
+ // We need the center and we can't use the
+ // standard NSWindow autosave because we change
+ // the window size at startup.
+ NSString *centerString = [[NSUserDefaults standardUserDefaults] objectForKey:@"HBPreviewWindowCenter"];
+ if (centerString.length)
+ {
+ NSPoint center = NSPointFromString(centerString);
+ NSRect frame = self.window.frame;
+ [self.window setFrameOrigin:NSMakePoint(center.x - floor(frame.size.width / 2),
+ center.y - floor(frame.size.height / 2))];
+
+ self.windowCenterPoint = center;
+ }
+ else
+ {
+ self.windowCenterPoint = [self centerPoint];
+ }
self.window.excludedFromWindowsMenu = YES;
self.window.acceptsMouseMovedEvents = YES;
if (self.previewView.fitToView == NO)
{
self.windowCenterPoint = [self centerPoint];
+ [[NSUserDefaults standardUserDefaults] setObject:NSStringFromPoint(self.windowCenterPoint) forKey:@"HBPreviewWindowCenter"];
}
}