Revision: 7691
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7691&view=rev
Author:   hofman
Date:     2012-03-30 10:37:14 +0000 (Fri, 30 Mar 2012)
Log Message:
-----------
determine whether nav window has a slider from pdfview

Modified Paths:
--------------
    trunk/SKNavigationWindow.h
    trunk/SKNavigationWindow.m
    trunk/SKPDFView.m

Modified: trunk/SKNavigationWindow.h
===================================================================
--- trunk/SKNavigationWindow.h  2012-03-29 16:57:19 UTC (rev 7690)
+++ trunk/SKNavigationWindow.h  2012-03-30 10:37:14 UTC (rev 7691)
@@ -48,7 +48,7 @@
     SKNavigationButton *closeButton;
     NSSlider *zoomSlider;
 }
-- (id)initWithPDFView:(SKPDFView *)pdfView hasSlider:(BOOL)hasSlider;
+- (id)initWithPDFView:(SKPDFView *)pdfView;
 - (void)handleScaleChangedNotification:(NSNotification *)notification;
 @end
 

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2012-03-29 16:57:19 UTC (rev 7690)
+++ trunk/SKNavigationWindow.m  2012-03-30 10:37:14 UTC (rev 7691)
@@ -62,9 +62,10 @@
 
 @implementation SKNavigationWindow
 
-- (id)initWithPDFView:(SKPDFView *)pdfView hasSlider:(BOOL)hasSlider {
+- (id)initWithPDFView:(SKPDFView *)pdfView {
     NSScreen *screen = [[pdfView window] screen] ?: [NSScreen mainScreen];
     CGFloat width = 4 * BUTTON_WIDTH + 2 * SEP_WIDTH + 2 * BUTTON_MARGIN;
+    BOOL hasSlider = [pdfView interactionMode] == SKFullScreenMode; 
     if (hasSlider)
         width += SLIDER_WIDTH;
     NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, 
NSMinY([screen frame]) + WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * 
BUTTON_MARGIN);

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2012-03-29 16:57:19 UTC (rev 7690)
+++ trunk/SKPDFView.m   2012-03-30 10:37:14 UTC (rev 7691)
@@ -2482,7 +2482,7 @@
         [[NSNotificationCenter defaultCenter] addObserver: self selector: 
@selector(handleWindowWillCloseNotification:) 
                                                      name: 
NSWindowWillCloseNotification object: [self window]];
     }
-    navWindow = [[SKNavigationWindow alloc] initWithPDFView:self 
hasSlider:interactionMode == SKFullScreenMode];
+    navWindow = [[SKNavigationWindow alloc] initWithPDFView:self];
     
     [self doAutohide:YES];
 }

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


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to