Revision: 28672
          http://sourceforge.net/p/bibdesk/svn/28672
Author:   hofman
Date:     2024-01-25 00:04:31 +0000 (Thu, 25 Jan 2024)
Log Message:
-----------
use backingAlignedRect for rubber band

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-24 
17:15:49 UTC (rev 28671)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-25 
00:04:31 UTC (rev 28672)
@@ -3443,7 +3443,13 @@
         [self _setSelectionIndexes:[self 
_allIndexesInRubberBandRect:rubberBandRect]];
         if (_rubberBandView == nil)
             _rubberBandView = [[FVRubberBandView alloc] 
initWithFrame:NSZeroRect];
-        [_rubberBandView setFrame:[self 
centerScanRect:NSInsetRect(rubberBandRect, 0.5, 0.5)]];
+#if !defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED < 
MAC_OS_X_VERSION_10_7
+        if (NO == [self 
respondsToSelector:@selector(backingAlignedRect:options:)])
+            rubberBandRect = [self centerScanRect:NSInsetRect(rubberBandRect, 
0.5, 0.5)];
+        else
+#endif
+        rubberBandRect = [self backingAlignedRect:rubberBandRect 
options:NSAlignMinXInward | NSAlignMaxXInward | NSAlignMinYInward | 
NSAlignMaxYInward];
+        [_rubberBandView setFrame:rubberBandRect];
         [self addSubview:_rubberBandView];
         [self autoscroll:event];
         [super mouseDragged:event];
@@ -5022,11 +5028,11 @@
 - (void)drawRect:(NSRect)dirtyRect {
     NSRect rect = [self bounds];
     [[NSColor colorWithCalibratedWhite:1.0 alpha:0.3] setFill];
-    NSRect r = [self centerScanRect:NSInsetRect(rect, 1.0, 1.0)];
-    NSRectFillUsingOperation(r, NSCompositingOperationSourceOver);
+    NSRectFillUsingOperation(NSInsetRect(rect, 1.0, 1.0), 
NSCompositingOperationSourceOver);
     // NSFrameRect doesn't respect setStroke
     [[NSColor lightGrayColor] setFill];
-    NSFrameRectWithWidth(r, 1.0);}
+    NSFrameRectWithWidth(rect, 1.0);
+}
 
 @end
 

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

Reply via email to