Revision: 12278
http://sourceforge.net/p/skim-app/code/12278
Author: hofman
Date: 2021-04-11 23:04:13 +0000 (Sun, 11 Apr 2021)
Log Message:
-----------
Use older column indentation on Big Sur
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
trunk/SKNotesDocument.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2021-04-11 22:49:38 UTC (rev 12277)
+++ trunk/SKMainWindowController_UI.m 2021-04-11 23:04:13 UTC (rev 12278)
@@ -114,7 +114,8 @@
#define SNAPSHOT_HEIGHT 200.0
-#define COLUMN_INDENTATION 16.0
+#define COLUMN_INDENTATION 9.0
+#define COLUMN_INDENTATION_OLD 16.0
#define EXTRA_ROW_HEIGHT 2.0
#define DEFAULT_TEXT_ROW_HEIGHT 85.0
#define DEFAULT_MARKUP_ROW_HEIGHT 50.0
@@ -843,7 +844,8 @@
if ([(PDFAnnotation *)item type] == nil) {
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;
+ CGFloat indentation = RUNNING_AFTER(10_15) ?
COLUMN_INDENTATION_OLD : COLUMN_INDENTATION;
+ rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0,
[tableColumn width] - indentation, CGFLOAT_MAX)].height;
}
rowHeight = fmax(rowHeight, [ov rowHeight]) + EXTRA_ROW_HEIGHT;
[rowHeights setFloat:rowHeight forKey:item];
@@ -1095,7 +1097,8 @@
CGFloat height = 0.0, rowHeight = [rightSideController.noteOutlineView
rowHeight];
NSTableColumn *tableColumn = [rightSideController.noteOutlineView
tableColumnWithIdentifier:NOTE_COLUMNID];
id cell = [tableColumn dataCell];
- NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] -
COLUMN_INDENTATION, CGFLOAT_MAX);
+ CGFloat indentation = RUNNING_AFTER(10_15) ? COLUMN_INDENTATION_OLD :
COLUMN_INDENTATION;
+ NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - indentation,
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];
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2021-04-11 22:49:38 UTC (rev 12277)
+++ trunk/SKNotesDocument.m 2021-04-11 23:04:13 UTC (rev 12278)
@@ -95,7 +95,8 @@
#define STATUSBAR_HEIGHT 22.0
-#define COLUMN_INDENTATION 16.0
+#define COLUMN_INDENTATION 9.0
+#define COLUMN_INDENTATION_OLD 16.0
#define EXTRA_ROW_HEIGHT 2.0
#define DEFAULT_TEXT_ROW_HEIGHT 85.0
@@ -534,7 +535,8 @@
CGFloat height,rowHeight = [outlineView rowHeight];
NSTableColumn *tableColumn = [outlineView
tableColumnWithIdentifier:NOTE_COLUMNID];
id cell = [tableColumn dataCell];
- NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] -
COLUMN_INDENTATION, CGFLOAT_MAX);
+ CGFloat indentation = RUNNING_AFTER(10_15) ? COLUMN_INDENTATION_OLD :
COLUMN_INDENTATION;
+ NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - indentation,
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];
@@ -810,7 +812,8 @@
if ([(PDFAnnotation *)item type] == nil) {
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;
+ CGFloat indentation = RUNNING_AFTER(10_15) ?
COLUMN_INDENTATION_OLD : COLUMN_INDENTATION;
+ rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0,
[tableColumn width] - indentation, CGFLOAT_MAX)].height;
}
rowHeight = fmax(rowHeight, [ov rowHeight]) + EXTRA_ROW_HEIGHT;
[rowHeights setFloat:rowHeight forKey:item];
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