Revision: 12277
          http://sourceforge.net/p/skim-app/code/12277
Author:   hofman
Date:     2021-04-11 22:49:38 +0000 (Sun, 11 Apr 2021)
Log Message:
-----------
Use full width cell frame to calculate note text row height rather than 
outlineview width, as Big Sur adds extra margins

Modified Paths:
--------------
    trunk/SKMainWindowController_UI.m
    trunk/SKNotesDocument.m

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2021-04-11 15:12:25 UTC (rev 12276)
+++ trunk/SKMainWindowController_UI.m   2021-04-11 22:49:38 UTC (rev 12277)
@@ -841,7 +841,7 @@
                 id cell = [tableColumn dataCell];
                 [cell setObjectValue:[item objectValue]];
                 if ([(PDFAnnotation *)item type] == nil) {
-                    rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
fmax(10.0, NSWidth([ov frame]) - COLUMN_INDENTATION - [ov 
indentationPerLevel]), CGFLOAT_MAX)].height;
+                    rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
fmax(10.0, NSWidth([ov frameOfCellAtColumn:-1 row:0]) - [ov 
indentationPerLevel]), CGFLOAT_MAX)].height;
                 } else if ([tableColumn isHidden] == NO) {
                     rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
[tableColumn width] - COLUMN_INDENTATION, CGFLOAT_MAX)].height;
                 }
@@ -1096,7 +1096,7 @@
     NSTableColumn *tableColumn = [rightSideController.noteOutlineView 
tableColumnWithIdentifier:NOTE_COLUMNID];
     id cell = [tableColumn dataCell];
     NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - 
COLUMN_INDENTATION, CGFLOAT_MAX);
-    NSRect fullRect = NSMakeRect(0.0, 0.0,  
NSWidth([rightSideController.noteOutlineView frame]) - COLUMN_INDENTATION - 
[rightSideController.noteOutlineView indentationPerLevel], CGFLOAT_MAX);
+    NSRect fullRect = NSMakeRect(0.0, 0.0,  
NSWidth([rightSideController.noteOutlineView frameOfCellAtColumn:-1 row:0]) - 
[rightSideController.noteOutlineView indentationPerLevel], CGFLOAT_MAX);
     NSMutableIndexSet *rowIndexes = nil;
     NSArray *items = [sender representedObject];
     NSInteger row;

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2021-04-11 15:12:25 UTC (rev 12276)
+++ trunk/SKNotesDocument.m     2021-04-11 22:49:38 UTC (rev 12277)
@@ -535,7 +535,7 @@
     NSTableColumn *tableColumn = [outlineView 
tableColumnWithIdentifier:NOTE_COLUMNID];
     id cell = [tableColumn dataCell];
     NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - 
COLUMN_INDENTATION, CGFLOAT_MAX);
-    NSRect fullRect = NSMakeRect(0.0, 0.0, NSWidth([outlineView frame]) - 
COLUMN_INDENTATION - [outlineView indentationPerLevel], CGFLOAT_MAX);
+    NSRect fullRect = NSMakeRect(0.0, 0.0, NSWidth([outlineView 
frameOfCellAtColumn:-1 row:0]) - [outlineView indentationPerLevel], 
CGFLOAT_MAX);
     NSMutableIndexSet *rowIndexes = nil;
     NSArray *items = [sender representedObject];
     NSInteger row;
@@ -808,7 +808,7 @@
             id cell = [tableColumn dataCell];
             [cell setObjectValue:[item objectValue]];
             if ([(PDFAnnotation *)item type] == nil) {
-                rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
fmax(10.0, NSWidth([ov frame]) - COLUMN_INDENTATION - [ov 
indentationPerLevel]), CGFLOAT_MAX)].height;
+                rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
fmax(10.0, NSWidth([ov frameOfCellAtColumn:-1 row:0]) - [ov 
indentationPerLevel]), CGFLOAT_MAX)].height;
             } else if ([tableColumn isHidden] == NO) {
                 rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, 
[tableColumn width] - COLUMN_INDENTATION, CGFLOAT_MAX)].height;
             }

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