Revision: 16066
          http://sourceforge.net/p/skim-app/code/16066
Author:   hofman
Date:     2026-03-15 21:57:59 +0000 (Sun, 15 Mar 2026)
Log Message:
-----------
pass NSNumbers for side pane widths

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-03-15 17:23:52 UTC (rev 16065)
+++ trunk/SKMainWindowController.m      2026-03-15 21:57:59 UTC (rev 16066)
@@ -190,7 +190,7 @@
 
 - (void)cleanup;
 
-- (void)applyLeftSideWidth:(CGFloat)leftSideWidth 
rightSideWidth:(CGFloat)rightSideWidth;
+- (void)applyLeftSideWidth:(NSNumber *)leftSideWidth rightSideWidth:(NSNumber 
*)rightSideWidth;
 
 - (void)updateTableFont;
 
@@ -413,7 +413,7 @@
     NSNumber *leftWidthNumber = [savedNormalSetup 
objectForKey:LEFTSIDEPANEWIDTH_KEY] ?: [sud 
objectForKey:SKLeftSidePaneWidthKey];
     NSNumber *rightWidthNumber = [savedNormalSetup 
objectForKey:RIGHTSIDEPANEWIDTH_KEY] ?: [sud 
objectForKey:SKRightSidePaneWidthKey];
     if (leftWidthNumber && rightWidthNumber)
-        [self applyLeftSideWidth:[leftWidthNumber doubleValue] 
rightSideWidth:[rightWidthNumber doubleValue]];
+        [self applyLeftSideWidth:leftWidthNumber 
rightSideWidth:rightWidthNumber];
     
     // this needs to be done before loading the PDFDocument
     [self resetThumbnailSizeIfNeeded];
@@ -532,9 +532,9 @@
     mwcFlags.settingUpWindow = 0;
 }
 
-- (void)applyLeftSideWidth:(CGFloat)leftSideWidth 
rightSideWidth:(CGFloat)rightSideWidth {
-    [splitView setPosition:leftSideWidth ofDividerAtIndex:0];
-    [splitView setPosition:[splitView maxPossiblePositionOfDividerAtIndex:1] - 
[splitView dividerThickness] - rightSideWidth ofDividerAtIndex:1];
+- (void)applyLeftSideWidth:(NSNumber *)leftSideWidth rightSideWidth:(NSNumber 
*)rightSideWidth {
+    [splitView setPosition:[leftSideWidth doubleValue] ofDividerAtIndex:0];
+    [splitView setPosition:[splitView maxPossiblePositionOfDividerAtIndex:1] - 
[splitView dividerThickness] - [rightSideWidth doubleValue] ofDividerAtIndex:1];
 }
 
 - (void)applySetup:(NSDictionary *)setup{
@@ -557,7 +557,7 @@
             NSNumber *leftWidthNumber = [setup 
objectForKey:LEFTSIDEPANEWIDTH_KEY];
             NSNumber *rightWidthNumber = [setup 
objectForKey:RIGHTSIDEPANEWIDTH_KEY];
             if (leftWidthNumber && rightWidthNumber)
-                [self applyLeftSideWidth:[leftWidthNumber doubleValue] 
rightSideWidth:[rightWidthNumber doubleValue]];
+                [self applyLeftSideWidth:leftWidthNumber 
rightSideWidth:rightWidthNumber];
         }
         
         if ([[pdfView document] isLocked]) {

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2026-03-15 17:23:52 UTC (rev 
16065)
+++ trunk/SKMainWindowController_FullScreen.m   2026-03-15 21:57:59 UTC (rev 
16066)
@@ -87,7 +87,7 @@
 static CGFloat fullScreenToolbarOffset = 0.0;
 
 @interface SKMainWindowController (SKFullScreenPrivate)
-- (void)applyLeftSideWidth:(CGFloat)leftSideWidth 
rightSideWidth:(CGFloat)rightSideWidth;
+- (void)applyLeftSideWidth:(NSNumber *)leftSideWidth rightSideWidth:(NSNumber 
*)rightSideWidth;
 @end
 
 @implementation SKMainWindowController (FullScreen)
@@ -564,7 +564,7 @@
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKCollapseSidePanesInFullScreenKey]) {
             [savedNormalSetup setObject:[self leftSideWidth] 
forKey:LEFTSIDEPANEWIDTH_KEY];
             [savedNormalSetup setObject:[self rightSideWidth] 
forKey:RIGHTSIDEPANEWIDTH_KEY];
-            [self applyLeftSideWidth:0.0 rightSideWidth:0.0];
+            [self applyLeftSideWidth:@0.0 rightSideWidth:@0.0];
         }
         if ([[pdfView document] isLocked] == NO) {
             NSDictionary *fullScreenSetup = [[NSUserDefaults 
standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
@@ -584,7 +584,7 @@
             NSNumber *leftWidthNumber = [savedNormalSetup 
objectForKey:LEFTSIDEPANEWIDTH_KEY];
             NSNumber *rightWidthNumber = [savedNormalSetup 
objectForKey:RIGHTSIDEPANEWIDTH_KEY];
             if (leftWidthNumber && rightWidthNumber)
-                [self applyLeftSideWidth:[leftWidthNumber doubleValue] 
rightSideWidth:[rightWidthNumber doubleValue]];
+                [self applyLeftSideWidth:leftWidthNumber 
rightSideWidth:rightWidthNumber];
         }
         if ([[[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey] count])
             [pdfView setDisplaySettingsAndRewind:savedNormalSetup];

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