Revision: 29133 http://sourceforge.net/p/bibdesk/svn/29133 Author: hofman Date: 2025-04-18 15:51:14 +0000 (Fri, 18 Apr 2025) Log Message: ----------- Reimplement viewDidEndLiveResize, and make sure super is called. Rename method and flag for redrawing after fast scrolling, don't reuse viewDidEndLiveResize.
Modified Paths: -------------- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h 2025-04-18 15:16:50 UTC (rev 29132) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h 2025-04-18 15:51:14 UTC (rev 29133) @@ -229,7 +229,7 @@ unsigned int isEditable:1; unsigned int isMouseDown:1; unsigned int isRescaling:1; - unsigned int scheduledLiveResize:1; + unsigned int scheduledEndFatScroling:1; unsigned int updatingFromSlider:1; unsigned int needsReload:1; unsigned int controllingSharedPreviewer:1; Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-18 15:16:50 UTC (rev 29132) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-18 15:51:14 UTC (rev 29133) @@ -351,7 +351,7 @@ _lastMouseDownLocInView = NSZeroPoint; // the next two are set to an illegal combination to indicate that no drop is in progress _fvFlags.isRescaling = NO; - _fvFlags.scheduledLiveResize = NO; + _fvFlags.scheduledEndFatScroling = NO; _fvFlags.controllingSharedPreviewer = NO; _fvFlags.controllingQLPreviewPanel = NO; _selectionIndexes = [[NSIndexSet alloc] init]; @@ -2279,6 +2279,12 @@ } } +// redraw at full quality after a resize +- (void)viewDidEndLiveResize { + [super viewDidEndLiveResize]; + [_contentView setNeedsDisplay:YES]; +} + // only invoked when autoscrolling or in response to user action - (NSRect)adjustScroll:(NSRect)proposedVisibleRect { @@ -2390,14 +2396,14 @@ } } -enum { FVDrawIcon = 1<<0, FVDrawText = 1<<1, FVDrawSelected = 1<<2 }; - -// redraw at full quality after a resize -- (void)_viewDidEndLiveResize { +// redraw at full quality after fast scrolling +- (void)_viewDidEndFastScrolling { [_contentView setNeedsDisplay:YES]; - _fvFlags.scheduledLiveResize = NO; + _fvFlags.scheduledEndFatScroling = NO; } +enum { FVDrawIcon = 1<<0, FVDrawText = 1<<1, FVDrawSelected = 1<<2 }; + - (void)_drawIconsInRows:(NSRange)rows columns:(NSRange)columns drawOption:(NSUInteger)drawOption { BOOL isResizing = [self inLiveResize]; @@ -2429,9 +2435,9 @@ BOOL useFastDrawingPath = (isResizing || _fvFlags.isRescaling || ([self _isFastScrolling] && _iconSize.height <= 256)); // redraw at high quality after scrolling - if (useFastDrawingPath && NO == _fvFlags.scheduledLiveResize && [self _isFastScrolling]) { - _fvFlags.scheduledLiveResize = YES; - [self performSelector:@selector(_viewDidEndLiveResize) withObject:nil afterDelay:0 inModes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; + if (useFastDrawingPath && NO == _fvFlags.scheduledEndFatScroling && [self _isFastScrolling]) { + _fvFlags.scheduledEndFatScroling = YES; + [self performSelector:@selector(_viewDidEndFastScrolling) withObject:nil afterDelay:0 inModes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; } // shadow needs to be scaled as the icon scale changes to approximate the IconServices shadow This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit