Revision: 15559 http://sourceforge.net/p/skim-app/code/15559 Author: hofman Date: 2025-06-28 17:00:08 +0000 (Sat, 28 Jun 2025) Log Message: ----------- revert an earlier commit to set side pane width, we don't always set from settings
Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-28 16:55:23 UTC (rev 15558) +++ trunk/SKMainWindowController.m 2025-06-28 17:00:08 UTC (rev 15559) @@ -189,7 +189,7 @@ - (SKDestination)destinationFromSetup:(NSDictionary *)setup; - (void)setDestination:(SKDestination)dest inSetup:(NSMutableDictionary *)setup; -- (void)applySideWidthsFromSetup:(NSDictionary *)setup; +- (void)applyLeftSideWidth:(CGFloat)leftSideWidth rightSideWidth:(CGFloat)rightSideWidth; - (void)updateTableFont; @@ -426,7 +426,10 @@ [pdfView setDelegate:self]; - [self applySideWidthsFromSetup:savedNormalSetup]; + 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]]; // this needs to be done before loading the PDFDocument [self resetThumbnailSizeIfNeeded]; @@ -545,13 +548,9 @@ mwcFlags.settingUpWindow = 0; } -- (void)applySideWidthsFromSetup:(NSDictionary *)setup { - NSNumber *leftWidth = [setup objectForKey:LEFTSIDEPANEWIDTH_KEY]; - NSNumber *rightWidth = [setup objectForKey:RIGHTSIDEPANEWIDTH_KEY]; - if (leftWidth && rightWidth) { - [splitView setPosition:[leftWidth doubleValue] ofDividerAtIndex:0]; - [splitView setPosition:[splitView maxPossiblePositionOfDividerAtIndex:1] - [splitView dividerThickness] - [rightWidth doubleValue] ofDividerAtIndex:1]; - } +- (void)applyLeftSideWidth:(CGFloat)leftSideWidth rightSideWidth:(CGFloat)rightSideWidth { + [splitView setPosition:leftSideWidth ofDividerAtIndex:0]; + [splitView setPosition:[splitView maxPossiblePositionOfDividerAtIndex:1] - [splitView dividerThickness] - rightSideWidth ofDividerAtIndex:1]; } - (void)applySetup:(NSDictionary *)setup{ @@ -569,7 +568,10 @@ [savedNormalWindow setFrame:NSRectFromString(rectString) display:NO]; } - [self applySideWidthsFromSetup:setup]; + NSNumber *leftWidthNumber = [setup objectForKey:LEFTSIDEPANEWIDTH_KEY]; + NSNumber *rightWidthNumber = [setup objectForKey:RIGHTSIDEPANEWIDTH_KEY]; + if (leftWidthNumber && rightWidthNumber) + [self applyLeftSideWidth:[leftWidthNumber doubleValue] rightSideWidth:[rightWidthNumber doubleValue]]; if ([[pdfView document] isLocked]) { NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit