Revision: 6944
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6944&view=rev
Author:   hofman
Date:     2010-12-07 22:35:14 +0000 (Tue, 07 Dec 2010)

Log Message:
-----------
cascade snapshot window before resizing it

Modified Paths:
--------------
    trunk/SKSnapshotWindowController.m

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2010-12-07 22:18:34 UTC (rev 6943)
+++ trunk/SKSnapshotWindowController.m  2010-12-07 22:35:14 UTC (rev 6944)
@@ -230,16 +230,17 @@
     [pdfView setDocument:pdfDocument];
     
     PDFPage *page = [pdfDocument pageAtIndex:pageNum];
-    NSRect contentRect = [pdfView convertRect:rect fromPage:page];
-    contentRect = [pdfView convertRect:contentRect toView:nil];
-    NSRect frame = [[self window] frame];
+    NSRect frame = [pdfView convertRect:rect fromPage:page];
+    frame = [pdfView convertRect:frame toView:nil];
     
-    contentRect.size.width += [NSScroller scrollerWidth];
-    contentRect.size.height += [NSScroller scrollerWidth];
-    frame.size = [[self window] frameRectForContentRect:contentRect].size;
+    [self 
setWindowFrameAutosaveNameOrCascade:SKSnapshotWindowFrameAutosaveName];
+    
+    frame.size.width += [NSScroller scrollerWidth];
+    frame.size.height += [NSScroller scrollerWidth];
+    frame = [[self window] frameRectForContentRect:frame];
+    frame.origin.x = NSMinX([[self window] frame]);
+    frame.origin.y = NSMaxY([[self window] frame]) - NSHeight(frame);
     frame = [[self window] constrainFrameRect:frame toScreen:[[self window] 
screen] ?: [NSScreen mainScreen]];
-    
-    [self 
setWindowFrameAutosaveNameOrCascade:SKSnapshotWindowFrameAutosaveName];
     [[self window] setFrame:NSIntegralRect(frame) display:NO animate:NO];
     
     [pdfView goToPage:page];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to