Revision: 3459
http://skim-app.svn.sourceforge.net/skim-app/?rev=3459&view=rev
Author: hofman
Date: 2008-03-10 11:38:02 -0700 (Mon, 10 Mar 2008)
Log Message:
-----------
Center reading bar when moving using shortcuts in continuous scrolling modes.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-03-08 15:34:52 UTC (rev 3458)
+++ trunk/SKPDFView.m 2008-03-10 18:38:02 UTC (rev 3459)
@@ -2671,7 +2671,13 @@
else if (eventChar == NSLeftArrowFunctionKey)
moved = [readingBar goToPreviousPage];
if (moved) {
- [self scrollRect:NSInsetRect([readingBar currentBounds], 0.0, -20.0)
inPageToVisible:[readingBar page]];
+ NSRect rect = NSInsetRect([readingBar currentBounds], 0.0, -20.0) ;
+ if ([self displayMode] == kPDFDisplaySinglePageContinuous || [self
displayMode] == kPDFDisplayTwoUpContinuous) {
+ NSRect visibleRect = [self convertRect:[[self documentView]
visibleRect] fromView:[self documentView]];
+ visibleRect = [self convertRect:visibleRect toPage:[readingBar
page]];
+ rect = NSInsetRect(rect, 0.0, - floorf( ( NSHeight(visibleRect) -
NSHeight(rect) ) / 2.0 ) );
+ }
+ [self scrollRect:rect inPageToVisible:[readingBar page]];
[self setNeedsDisplay:YES];
[userInfo setObject:[readingBar page] forKey:@"newPage"];
[[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self
userInfo:userInfo];
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 2008.
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