Revision: 13397
          http://sourceforge.net/p/skim-app/code/13397
Author:   hofman
Date:     2023-03-20 15:14:15 +0000 (Mon, 20 Mar 2023)
Log Message:
-----------
animate showing and hiding of presentation preview window together with 
presentation transition

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

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2023-03-20 14:57:08 UTC (rev 
13396)
+++ trunk/SKMainWindowController_FullScreen.m   2023-03-20 15:14:15 UTC (rev 
13397)
@@ -276,11 +276,6 @@
         SKDESTROY(activity);
     }
     
-    if (presentationPreview) {
-        [presentationPreview close];
-        [presentationPreview autorelease];
-        presentationPreview = nil;
-    }
     [self removePresentationNotesNavigation];
     
     if ([pdfView respondsToSelector:@selector(enablePageShadows:)])
@@ -459,6 +454,7 @@
             [[fullScreenWindow animator] setAlphaValue:1.0];
             if (NSContainsRect([fullScreenWindow frame], [animationWindow 
frame]) == NO)
                 [[animationWindow animator] setAlphaValue:0.0];
+            [[[presentationPreview window] animator] setAlphaValue:1.0];
         }
         completionHandler:^{
             [animationWindow orderOut:nil];
@@ -537,10 +533,16 @@
             if (covered == NO)
                 [[mainWindow animator] setAlphaValue:1.0];
             [[animationWindow animator] setAlphaValue:0.0];
+            [[[presentationPreview window] animator] setAlphaValue:0.0];
         }
         completionHandler:^{
             [animationWindow orderOut:nil];
             SKDESTROY(animationWindow);
+            if (presentationPreview) {
+                [[presentationPreview window] 
setAnimationBehavior:NSWindowAnimationBehaviorNone];
+                [presentationPreview close];
+                [presentationPreview autorelease];
+            }
         }];
     
     // the page number may have changed

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2023-03-20 14:57:08 UTC (rev 13396)
+++ trunk/SKSnapshotWindowController.m  2023-03-20 15:14:15 UTC (rev 13397)
@@ -284,10 +284,14 @@
             [[self delegate] snapshotController:self didFinishSetup:openType];
         });
     
-    if (openType == SKSnapshotOpenPreview)
+    if (openType == SKSnapshotOpenPreview) {
+        [[self window] setAlphaValue:0.0];
+        [[self window] setAnimationBehavior:NSWindowAnimationBehaviorNone];
         [[self window] orderFront:nil];
-    else if ([self hasWindow])
+        [[self window] setAnimationBehavior:NSWindowAnimationBehaviorDefault];
+    } else if ([self hasWindow]) {
         [self showWindow:nil];
+    }
 }
 
 - (void)setPdfDocument:(PDFDocument *)pdfDocument 
goToPageNumber:(NSInteger)pageNum rect:(NSRect)rect scaleFactor:(CGFloat)factor 
autoFits:(BOOL)autoFits screen:(NSScreen *)screen 
openType:(SKSnapshotOpenType)openType {

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to