Revision: 29156
http://sourceforge.net/p/bibdesk/svn/29156
Author: hofman
Date: 2025-04-21 14:59:16 +0000 (Mon, 21 Apr 2025)
Log Message:
-----------
Ignore fast or low quality drawing when drawing selection for drag image
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-21
09:30:13 UTC (rev 29155)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-21
14:59:16 UTC (rev 29156)
@@ -2415,7 +2415,9 @@
- (void)_drawIconsInRows:(NSRange)rows columns:(NSRange)columns
drawOption:(NSUInteger)drawOption
{
- BOOL isResizing = [self inLiveResize];
+ BOOL drawView = (drawOption & FVDrawSelected) != 0;
+ BOOL isResizing = drawView && ([self inLiveResize] ||
_fvFlags.isRescaling);
+ BOOL isSmallIcon = drawView && _iconSize.height <= 256;
NSUInteger r, rMin = rows.location, rMax = NSMaxRange(rows);
NSUInteger c, cMin = columns.location, cMax = NSMaxRange(columns);
@@ -2426,22 +2428,22 @@
CGContextSetBlendMode(cgContext, kCGBlendModeNormal);
// don't limit quality based on scrolling unless we really need to
- if (isResizing || _fvFlags.isRescaling) {
+ if (isResizing) {
CGContextSetInterpolationQuality(cgContext, kCGInterpolationNone);
CGContextSetShouldAntialias(cgContext, false);
}
- else if (_iconSize.height > 256) {
- CGContextSetInterpolationQuality(cgContext, kCGInterpolationHigh);
+ else if (isSmallIcon) {
+ CGContextSetInterpolationQuality(cgContext, kCGInterpolationDefault);
CGContextSetShouldAntialias(cgContext, true);
}
else {
- CGContextSetInterpolationQuality(cgContext, kCGInterpolationDefault);
+ CGContextSetInterpolationQuality(cgContext, kCGInterpolationHigh);
CGContextSetShouldAntialias(cgContext, true);
}
// we should use the fast path when scrolling at small sizes; PDF sucks in
that case...
- BOOL useFastDrawingPath = (isResizing || _fvFlags.isRescaling || ([self
_isFastScrolling] && _iconSize.height <= 256));
+ BOOL useFastDrawingPath = (isResizing || ([self _isFastScrolling] &&
isSmallIcon));
// redraw at high quality after scrolling
if (useFastDrawingPath && NO == _fvFlags.scheduledEndFastScroling && [self
_isFastScrolling]) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit