Revision: 25359
          http://sourceforge.net/p/bibdesk/svn/25359
Author:   hofman
Date:     2021-01-10 17:46:23 +0000 (Sun, 10 Jan 2021)
Log Message:
-----------
Scale dimensions in placeholder image with default resolution

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

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m      
2021-01-10 16:02:50 UTC (rev 25358)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m      
2021-01-10 17:46:23 UTC (rev 25359)
@@ -38,6 +38,7 @@
 
 #import "FVPlaceholderImage.h"
 #import "FVUtilities.h"
+#import "FVIcon_Private.h"
 
 // Instruments showed a fair number of paths being created in drawing 
placeholders, and drawing an image is faster and less memory intensive than 
drawing a path each time.  Most of the path drawing overhead is in fonts, so 
there's not much we can do about that.
 static CFMutableDictionaryRef _placeholders = NULL;
@@ -72,12 +73,12 @@
         [NSGraphicsContext setCurrentContext:nsContext];
         [nsContext saveGraphicsState];
         
-        CGFloat radius = MIN(NSWidth(dstRect) / 4.0, 10.0);
-        CGFloat lineWidth = MIN((CGFloat)_sizes[i] / 64, 2.0);
+        CGFloat radius = fmin(NSWidth(dstRect) / 4.0, 10.0 * FVDefaultScale);
+        CGFloat lineWidth = fmin((CGFloat)_sizes[i] / 64, 2.0 * 
FVDefaultScale);
         dstRect = NSInsetRect(dstRect, 2.0, 2.0);
         
         NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:dstRect 
xRadius:radius yRadius:radius];
-        CGFloat pattern[2] = { 6.0, 3.0 };
+        CGFloat pattern[2] = { 6.0 * FVDefaultScale, 3.0 * FVDefaultScale };
         
         [path setLineWidth:lineWidth];
         [path setLineDash:pattern count:2 phase:0.0];

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

Reply via email to