Revision: 16288
http://sourceforge.net/p/skim-app/code/16288
Author: hofman
Date: 2026-05-12 14:36:08 +0000 (Tue, 12 May 2026)
Log Message:
-----------
Rename method. Reset row height when changing font of notet outlineview when
autoresizing row heights
Modified Paths:
--------------
trunk/SKMainWindowController.m
trunk/SKMainWindowController_UI.m
trunk/SKNoteOutlineView.h
trunk/SKNoteOutlineView.m
trunk/SKNotesDocument.m
trunk/SKTableView.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKMainWindowController.m 2026-05-12 14:36:08 UTC (rev 16288)
@@ -839,6 +839,8 @@
- (void)updateTableFont {
NSFont *font = [NSFont systemFontOfSize:[[NSUserDefaults
standardUserDefaults] floatForKey:SKTableFontSizeKey]];
+ if (mwcFlags.autoResizeNoteRows)
+ [rightSideController.noteOutlineView resetRowHeights];
[leftSideController.tocOutlineView setFont:font];
[rightSideController.noteOutlineView setFont:font];
[leftSideController.findTableView setFont:font];
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKMainWindowController_UI.m 2026-05-12 14:36:08 UTC (rev 16288)
@@ -952,7 +952,7 @@
if (mwcFlags.autoResizeNoteRows && [[notification object]
isEqual:rightSideController.noteOutlineView] &&
[(SKScrollView *)[rightSideController.noteOutlineView
enclosingScrollView] isResizingSubviews] == NO)
- [rightSideController.noteOutlineView
performSelectorOnce:@selector(updateRowHeights) afterDelay:0.0];
+ [rightSideController.noteOutlineView
performSelectorOnce:@selector(noteHeightOfRowsChanged) afterDelay:0.0];
}
- (void)outlineViewColumnDidMove:(NSNotification *)notification {
@@ -967,7 +967,7 @@
break;
}
if (oldColumn == firstColumn || newColumn == firstColumn)
- [rightSideController.noteOutlineView
performSelectorOnce:@selector(updateRowHeights) afterDelay:0.0];
+ [rightSideController.noteOutlineView
performSelectorOnce:@selector(noteHeightOfRowsChanged) afterDelay:0.0];
}
}
@@ -1266,7 +1266,7 @@
- (void)resetHeightOfNoteRows:(id)sender {
NSArray *items = [sender representedObject];
if (items == nil) {
- [rightSideController.noteOutlineView updateRowHeights];
+ [rightSideController.noteOutlineView noteHeightOfRowsChanged];
} else {
SKNoteOutlineView *ov = rightSideController.noteOutlineView;
NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet];
@@ -1332,7 +1332,7 @@
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
NSView *view = [rightSideController.noteOutlineView enclosingScrollView];
if (mwcFlags.autoResizeNoteRows) {
- [rightSideController.noteOutlineView updateRowHeights];
+ [rightSideController.noteOutlineView noteHeightOfRowsChanged];
[nc addObserver:self
selector:@selector(handleNoteViewFrameDidChangeNotification:)
name:NSViewFrameDidChangeNotification object:view];
[nc addObserver:self
selector:@selector(handleNoteViewDidEndLiveResizeNotification:)
@@ -2076,7 +2076,7 @@
} else {
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.0];
- [rightSideController.noteOutlineView updateRowHeights];
+ [rightSideController.noteOutlineView noteHeightOfRowsChanged];
[NSAnimationContext beginGrouping];
}
}
@@ -2084,7 +2084,7 @@
- (void)handleNoteViewDidEndLiveResizeNotification:(NSNotification
*)notification {
if (mwcFlags.noteRowHeightsNeedUpdate && mwcFlags.autoResizeNoteRows) {
- [rightSideController.noteOutlineView updateRowHeights];
+ [rightSideController.noteOutlineView noteHeightOfRowsChanged];
}
}
Modified: trunk/SKNoteOutlineView.h
===================================================================
--- trunk/SKNoteOutlineView.h 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKNoteOutlineView.h 2026-05-12 14:36:08 UTC (rev 16288)
@@ -56,7 +56,7 @@
- (CGFloat)rowHeightForItem:(id)item;
- (void)setRowHeight:(CGFloat)rowHeight forItem:(id)item;
- (void)resetRowHeights;
-- (void)updateRowHeights;
+- (void)noteHeightOfRowsChanged;
@end
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKNoteOutlineView.m 2026-05-12 14:36:08 UTC (rev 16288)
@@ -118,7 +118,7 @@
[rowHeights removeAllObjects];
}
-- (void)updateRowHeights {
+- (void)noteHeightOfRowsChanged {
[rowHeights removeAllObjects];
[self noteHeightOfRowsWithIndexesChanged:[NSIndexSet
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKNotesDocument.m 2026-05-12 14:36:08 UTC (rev 16288)
@@ -555,7 +555,7 @@
- (void)resetHeightOfNoteRows:(id)sender {
NSArray *items = [sender representedObject];
if (items == nil) {
- [outlineView updateRowHeights];
+ [outlineView noteHeightOfRowsChanged];
} else {
NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet];
for (id item in items) {
@@ -572,7 +572,7 @@
if (ndFlags.autoResizeRows && [[notification object] inLiveResize] == NO) {
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.0];
- [outlineView updateRowHeights];
+ [outlineView noteHeightOfRowsChanged];
[NSAnimationContext endGrouping];
}
}
@@ -579,7 +579,7 @@
- (void)handleScrollViewDidEndLiveResizeNotification:(NSNotification
*)notification {
if (ndFlags.autoResizeRows) {
- [outlineView updateRowHeights];
+ [outlineView noteHeightOfRowsChanged];
}
}
@@ -588,7 +588,7 @@
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
NSView *view = [outlineView enclosingScrollView];
if (ndFlags.autoResizeRows) {
- [outlineView updateRowHeights];
+ [outlineView noteHeightOfRowsChanged];
[nc addObserver:self
selector:@selector(handleScrollViewFrameDidChangeNotification:)
name:NSViewFrameDidChangeNotification object:view];
[nc addObserver:self
selector:@selector(handleScrollViewDidEndLiveResizeNotification:)
@@ -737,7 +737,7 @@
- (void)outlineViewColumnDidResize:(NSNotification *)notification{
if (ndFlags.autoResizeRows && [(SKScrollView *)[[notification object]
enclosingScrollView] isResizingSubviews] == NO)
- [outlineView performSelectorOnce:@selector(updateRowHeights)
afterDelay:0.0];
+ [outlineView performSelectorOnce:@selector(noteHeightOfRowsChanged)
afterDelay:0.0];
}
- (void)outlineViewColumnDidMove:(NSNotification *)notification {
@@ -752,7 +752,7 @@
break;
}
if (oldColumn == firstColumn || newColumn == firstColumn)
- [outlineView performSelectorOnce:@selector(updateRowHeights)
afterDelay:0.0];
+ [outlineView
performSelectorOnce:@selector(noteHeightOfRowsChanged) afterDelay:0.0];
}
}
Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2026-05-12 09:25:06 UTC (rev 16287)
+++ trunk/SKTableView.m 2026-05-12 14:36:08 UTC (rev 16288)
@@ -231,7 +231,7 @@
[[view textField] setFont:newFont];
}
}];
- [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
+ [self noteHeightOfRowsChanged];
}
}
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