Revision: 14189
http://sourceforge.net/p/skim-app/code/14189
Author: hofman
Date: 2024-04-07 15:39:09 +0000 (Sun, 07 Apr 2024)
Log Message:
-----------
Switch to fullscreen setup and background before going into full screen, this
will animate into the new settings at least with the default animations
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2024-04-07 14:57:49 UTC (rev
14188)
+++ trunk/SKMainWindowController_FullScreen.m 2024-04-07 15:39:09 UTC (rev
14189)
@@ -606,6 +606,12 @@
[savedNormalSetup setDictionary:[self currentPDFSettings]];
NSString *frameString = NSStringFromRect([[self window] frame]);
[savedNormalSetup setObject:frameString forKey:MAINWINDOWFRAME_KEY];
+ NSColor *backgroundColor = [PDFView defaultFullScreenBackgroundColor];
+ NSDictionary *fullScreenSetup = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
+ [pdfView setBackgroundColor:backgroundColor];
+ [secondaryPdfView setBackgroundColor:backgroundColor];
+ if ([[pdfView document] isLocked] == NO && [fullScreenSetup count])
+ [self applyPDFSettings:fullScreenSetup rewind:YES];
}
- (NSApplicationPresentationOptions)window:(NSWindow *)window
willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions
{
@@ -668,19 +674,22 @@
// save the offset for the next time, we may guess it wrong as it
varies between OS versions
fullScreenToolbarOffset = toolbarItemOffset -
fullScreenToolbarOffset;
}
- NSColor *backgroundColor = [PDFView defaultFullScreenBackgroundColor];
- NSDictionary *fullScreenSetup = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
[pdfView setInteractionMode:SKFullScreenMode];
[touchBarController interactionModeChanged];
- [pdfView setBackgroundColor:backgroundColor];
- [secondaryPdfView setBackgroundColor:backgroundColor];
- if ([[pdfView document] isLocked] == NO && [fullScreenSetup count])
- [self applyPDFSettings:fullScreenSetup rewind:YES];
[self forceSubwindowsOnTop:YES];
mwcFlags.isSwitchingFullScreen = 0;
}
- (void)windowDidFailToEnterFullScreen:(NSWindow *)window {
+ if (interactionMode == SKFullScreenMode) {
+ interactionMode = SKNormalMode;
+ NSColor *backgroundColor = [PDFView defaultBackgroundColor];
+ NSDictionary *fullScreenSetup = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
+ [pdfView setBackgroundColor:backgroundColor];
+ [secondaryPdfView setBackgroundColor:backgroundColor];
+ if ([[pdfView document] isLocked] == NO && [fullScreenSetup count])
+ [self applyPDFSettings:savedNormalSetup rewind:YES];
+ }
if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1)
[savedNormalSetup removeAllObjects];
animationWindow = nil;
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