Revision: 15344
http://sourceforge.net/p/skim-app/code/15344
Author: hofman
Date: 2025-06-02 09:09:22 +0000 (Mon, 02 Jun 2025)
Log Message:
-----------
Block top strip of animated window during animation using a black layer, this
gives a better animation when showing the menu bar in fullscreen mode
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2025-06-01 21:21:51 UTC (rev
15343)
+++ trunk/SKMainWindowController_FullScreen.m 2025-06-02 09:09:22 UTC (rev
15344)
@@ -611,7 +611,8 @@
[savedNormalSetup setObject:@YES forKey:USECUSTOMANIMATION_KEY];
if (fullScreenToolbarOffset <= 0.0 && autoHideToolbarInFullScreen() == NO
&& [[window toolbar] isVisible])
fullScreenToolbarOffset = toolbarViewOffset(window);
- NSRect frame = SKShrinkRect([[window screen] frame],
-fullScreenOffset(window), NSMaxYEdge);
+ CGFloat offset = fullScreenOffset(window);
+ NSRect frame = SKShrinkRect([[window screen] frame], -offset, NSMaxYEdge);
if ([[NSUserDefaults standardUserDefaults]
boolForKey:AppleMenuBarVisibleInFullscreenKey])
frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0;
if (savedNormalWindow != nil) {
@@ -626,6 +627,11 @@
}
[(SKMainWindow *)window setDisableConstrainedFrame:YES];
[window setFrame:frame display:YES];
+ CALayer *blackLayer = [CALayer layer];
+ [blackLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
+ [blackLayer setZPosition:1.0];
+ [blackLayer setFrame:SKSliceRect([window convertRectFromScreen:frame],
offset, NSMaxYEdge)];
+ [[[[window contentView] superview] layer] addSublayer:blackLayer];
[self windowWillEnterFullScreenStyle:window];
setAlphaValueOfTitleBarControls(window, 0.0, NO);
[(SKMainWindow *)window setDisableConstrainedFrame:NO];
@@ -635,6 +641,7 @@
[[window animator] setAlphaValue:1.0];
}
completionHandler:^{
+ [blackLayer removeFromSuperlayer];
[displayWindow orderOut:nil];
if (noteToolbar)
[window addTitlebarAccessoryViewController:noteToolbar];
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