Revision: 3336
http://skim-app.svn.sourceforge.net/skim-app/?rev=3336&view=rev
Author: hofman
Date: 2007-12-25 03:08:33 -0800 (Tue, 25 Dec 2007)
Log Message:
-----------
Align window at top when zooming to fit the PDF.
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-12-23 15:39:59 UTC (rev 3335)
+++ trunk/SKMainWindowController.m 2007-12-25 11:08:33 UTC (rev 3336)
@@ -1952,8 +1952,8 @@
PDFDisplayMode displayMode = [pdfView displayMode];
NSRect frame = [splitView frame];
+ float top = NSMaxY(frame);
NSRect documentRect = [[[self pdfView] documentView] convertRect:[[[self
pdfView] documentView] bounds] toView:nil];
- float bottomOffset = -1.0;
if ([[self pdfView] autoScales]) {
documentRect.size.width /= [[self pdfView] scaleFactor];
@@ -1975,10 +1975,8 @@
frame.size.width += [NSScroller scrollerWidth];
}
- if ([statusBar isVisible])
- bottomOffset = NSHeight([statusBar frame]);
- frame.origin.y -= bottomOffset;
- frame.size.height += bottomOffset;
+ frame.size.height += [statusBar isVisible] ? NSHeight([statusBar frame]) :
-1;
+ frame.origin.y = top - NSHeight(frame);
frame.origin = [[self window] convertBaseToScreen:[[[self window]
contentView] convertPoint:frame.origin toView:nil]];
frame = [[self window] frameRectForContentRect:frame];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit