Revision: 16097
          http://sourceforge.net/p/skim-app/code/16097
Author:   hofman
Date:     2026-03-24 17:22:46 +0000 (Tue, 24 Mar 2026)
Log Message:
-----------
Default to auto-hide the toolbar and sidebars in full screen. Replace hidden 
preferences to allow showing them.

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-03-24 17:12:21 UTC (rev 16096)
+++ trunk/SKMainWindowController.m      2026-03-24 17:22:46 UTC (rev 16097)
@@ -185,7 +185,7 @@
 
 #define SKTitleAndToolbarStyleKey @"SKTitleAndToolbarStyle"
 
-#define SKCollapseSidePanesInFullScreenKey @"SKCollapseSidePanesInFullScreen"
+#define SKShowSidePanesInFullScreenKey @"SKShowSidePanesInFullScreen"
 
 #pragma mark -    
 
@@ -593,7 +593,7 @@
                 [savedNormalWindow setFrame:NSRectFromString(rectString) 
display:NO];
         }
         
-        BOOL applySidePaneWidths = [self interactionMode] != SKFullScreenMode 
|| [[NSUserDefaults standardUserDefaults] 
boolForKey:SKCollapseSidePanesInFullScreenKey] == NO;
+        BOOL applySidePaneWidths = [self interactionMode] != SKFullScreenMode 
|| [[NSUserDefaults standardUserDefaults] 
boolForKey:SKShowSidePanesInFullScreenKey];
         if (applySidePaneWidths) {
             [self setLeftSideWidth:[setup objectForKey:LEFTSIDEPANEWIDTH_KEY]];
             [self setRightSideWidth:[setup 
objectForKey:RIGHTSIDEPANEWIDTH_KEY]];

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2026-03-24 17:12:21 UTC (rev 
16096)
+++ trunk/SKMainWindowController_FullScreen.m   2026-03-24 17:22:46 UTC (rev 
16097)
@@ -76,8 +76,8 @@
 #define LEFTSIDEPANEWIDTH_KEY       @"leftSidePaneWidth"
 #define RIGHTSIDEPANEWIDTH_KEY      @"rightSidePaneWidth"
 
-#define SKAutoHideToolbarInFullScreenKey @"SKAutoHideToolbarInFullScreen"
-#define SKCollapseSidePanesInFullScreenKey @"SKCollapseSidePanesInFullScreen"
+#define SKShowToolbarInFullScreenKey @"SKShowToolbarInFullScreen"
+#define SKShowSidePanesInFullScreenKey @"SKShowSidePanesInFullScreen"
 #define SKResizablePresentationKey @"SKResizablePresentation"
 
 #define AppleMenuBarVisibleInFullscreenKey @"AppleMenuBarVisibleInFullscreen"
@@ -539,7 +539,7 @@
 }
 
 static inline void saveFullScreenToolbarOffset(NSWindow *window) {
-    if (fullScreenToolbarOffset < 0.0 && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKAutoHideToolbarInFullScreenKey] == NO && 
[[window toolbar] isVisible] && hasUnifiedToolbar(window) == NO) {
+    if (fullScreenToolbarOffset < 0.0 && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKShowToolbarInFullScreenKey] && [[window 
toolbar] isVisible] && hasUnifiedToolbar(window) == NO) {
         CGFloat toolbarItemOffset = toolbarViewOffset(window);
         if (toolbarItemOffset < 0.0)
             // save the offset for the next time, we may guess it wrong as it 
varies between OS versions
@@ -553,7 +553,7 @@
         NSColor *backgroundColor = [PDFView defaultFullScreenBackgroundColor];
         [pdfView setBackgroundColor:backgroundColor];
         [secondaryPdfView setBackgroundColor:backgroundColor];
-        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKCollapseSidePanesInFullScreenKey]) {
+        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKShowSidePanesInFullScreenKey] == NO) {
             [savedNormalSetup setObject:[self leftSideWidth] 
forKey:LEFTSIDEPANEWIDTH_KEY];
             [savedNormalSetup setObject:[self rightSideWidth] 
forKey:RIGHTSIDEPANEWIDTH_KEY];
             [self setLeftSideWidth:@0.0];
@@ -573,7 +573,7 @@
         NSColor *backgroundColor = [PDFView defaultBackgroundColor];
         [pdfView setBackgroundColor:backgroundColor];
         [secondaryPdfView setBackgroundColor:backgroundColor];
-        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKCollapseSidePanesInFullScreenKey]) {
+        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKShowSidePanesInFullScreenKey] == NO) {
             [self setLeftSideWidth:[savedNormalSetup 
objectForKey:LEFTSIDEPANEWIDTH_KEY]];
             [self setRightSideWidth:[savedNormalSetup 
objectForKey:RIGHTSIDEPANEWIDTH_KEY]];
         }
@@ -592,10 +592,10 @@
 }
 
 - (NSApplicationPresentationOptions)window:(NSWindow *)window 
willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions
 {
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKAutoHideToolbarInFullScreenKey])
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKShowToolbarInFullScreenKey])
+        return proposedOptions;
+    else
         return proposedOptions | NSApplicationPresentationAutoHideToolbar;
-    else
-        return proposedOptions;
 }
 
 - (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window {
@@ -615,7 +615,7 @@
     NSWindow *displayWindow = savedNormalWindow;
     savedNormalWindow = nil;
     [self displayStaticContentInWindow:displayWindow ordered:NSWindowBelow];
-    BOOL showToolbarWindow = [[NSUserDefaults standardUserDefaults] 
boolForKey:SKAutoHideToolbarInFullScreenKey] == NO;
+    BOOL showToolbarWindow = [[NSUserDefaults standardUserDefaults] 
boolForKey:SKShowToolbarInFullScreenKey];
     CGFloat offset = 0.0;
     NSTitlebarAccessoryViewController *noteToolbar = nil;
     CALayer *blackLayer = 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

Reply via email to