Revision: 16208
http://sourceforge.net/p/skim-app/code/16208
Author: hofman
Date: 2026-05-03 16:02:55 +0000 (Sun, 03 May 2026)
Log Message:
-----------
coalesce and delay auto resizing note rows when live resizing view
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
trunk/SKNotesDocument.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2026-05-03 15:04:16 UTC (rev 16207)
+++ trunk/SKMainWindowController_UI.m 2026-05-03 16:02:55 UTC (rev 16208)
@@ -2018,8 +2018,12 @@
- (void)handleNoteViewFrameDidChangeNotification:(NSNotification
*)notification {
if (mwcFlags.autoResizeNoteRows) {
- [rightSideController.noteOutlineView resetRowHeights];
- [rightSideController.noteOutlineView
noteHeightOfRowsChangedAnimating:NO];
+ if ([[notification object] inLiveResize]) {
+ [self performSelectorOnce:@selector(resetNoteRowHeights)
afterDelay:0.0];
+ } else {
+ [rightSideController.noteOutlineView resetRowHeights];
+ [rightSideController.noteOutlineView
noteHeightOfRowsChangedAnimating:NO];
+ }
}
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2026-05-03 15:04:16 UTC (rev 16207)
+++ trunk/SKNotesDocument.m 2026-05-03 16:02:55 UTC (rev 16208)
@@ -192,10 +192,19 @@
[self saveRecentDocumentInfo];
}
+- (void)resetRowHeights {
+ [outlineView resetRowHeights];
+ [outlineView noteHeightOfRowsChangedAnimating:YES];
+}
+
- (void)windowDidResize:(NSNotification *)notification {
if (ndFlags.autoResizeRows) {
- [outlineView resetRowHeights];
- [outlineView noteHeightOfRowsChangedAnimating:NO];
+ if ([[[notification object] contentView] inLiveResize]) {
+ [self performSelectorOnce:@selector(resetRowHeights)
afterDelay:0.0];
+ } else {
+ [outlineView resetRowHeights];
+ [outlineView noteHeightOfRowsChangedAnimating:NO];
+ }
}
}
@@ -559,11 +568,6 @@
[outlineView noteHeightOfRowsWithIndexesChanged:rowIndexes ?: [NSIndexSet
indexSetWithIndexesInRange:NSMakeRange(0, [outlineView numberOfRows])]];
}
-- (void)resetRowHeights {
- [outlineView resetRowHeights];
- [outlineView noteHeightOfRowsChangedAnimating:YES];
-}
-
- (void)resetHeightOfNoteRows:(id)sender {
NSArray *items = [sender representedObject];
if (items == nil) {
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