Revision: 13286
http://sourceforge.net/p/skim-app/code/13286
Author: hofman
Date: 2023-02-04 16:20:11 +0000 (Sat, 04 Feb 2023)
Log Message:
-----------
shortly display transition view when going into presentation mode to prepare it
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
trunk/SKTransitionController.h
trunk/SKTransitionController.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2023-02-04 15:49:29 UTC (rev
13285)
+++ trunk/SKMainWindowController_FullScreen.m 2023-02-04 16:20:11 UTC (rev
13286)
@@ -63,6 +63,7 @@
#import "NSScreen_SKExtensions.h"
#import "NSColor_SKExtensions.h"
#import "SKStatusBar.h"
+#import "SKTransitionController.h"
#define MAINWINDOWFRAME_KEY @"windowFrame"
#define LEFTSIDEPANEWIDTH_KEY @"leftSidePaneWidth"
@@ -323,6 +324,7 @@
[pdfView activateConstraintsToSuperview];
[pdfView layoutDocumentView];
[pdfView requiresDisplay];
+ [[pdfView transitionController] prepareViewIfNeeded];
[fullScreenWindow makeFirstResponder:pdfView];
[fullScreenWindow recalculateKeyViewLoop];
[fullScreenWindow setDelegate:self];
Modified: trunk/SKTransitionController.h
===================================================================
--- trunk/SKTransitionController.h 2023-02-04 15:49:29 UTC (rev 13285)
+++ trunk/SKTransitionController.h 2023-02-04 16:20:11 UTC (rev 13286)
@@ -65,4 +65,6 @@
- (void)animateForRect:(NSRect)rect from:(NSUInteger)fromIndex
to:(NSUInteger)toIndex change:(NSRect (^)(void))change;
+- (void)prepareViewIfNeeded;
+
@end
Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m 2023-02-04 15:49:29 UTC (rev 13285)
+++ trunk/SKTransitionController.m 2023-02-04 16:20:11 UTC (rev 13286)
@@ -450,6 +450,17 @@
[tView setImage:nil];
}
+- (void)prepareViewIfNeeded {
+ if (transitionView == nil && [self hasTransition]) {
+ NSRect bounds = [view bounds];
+ CGFloat imageScale = 1.0;
+ CIImage *image = [self currentImageForRect:bounds scale:&imageScale];
+ CGRect cgBounds = scaleRect(bounds, imageScale);
+ [self showTransitionViewForRect:bounds image:image extent:cgBounds];
+ [self performSelector:@selector(removeTransitionView) withObject:nil
afterDelay:0.0];
+ }
+}
+
- (void)animateForRect:(NSRect)rect from:(NSUInteger)fromIndex
to:(NSUInteger)toIndex change:(NSRect (^)(void))change {
if (animating) {
change();
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