Revision: 13677
          http://sourceforge.net/p/skim-app/code/13677
Author:   hofman
Date:     2023-10-15 14:48:21 +0000 (Sun, 15 Oct 2023)
Log Message:
-----------
use 2pt margin around contents for FitB, FitBH, and FitBV destinations

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2023-10-10 15:52:08 UTC (rev 13676)
+++ trunk/PDFPage_SKExtensions.m        2023-10-15 14:48:21 UTC (rev 13677)
@@ -152,11 +152,11 @@
         foregroundRect.origin = SKAddPoints(foregroundRect.origin, 
bounds.origin);
     }
     [imageRep release];
-    return foregroundRect;
+    return NSIntersectionRect(NSInsetRect(foregroundRect, -2.0, -2.0), bounds);
 }
 
 - (NSRect)foregroundBox {
-    return NSIntersectionRect(NSInsetRect([self foregroundRect], 
-[[NSUserDefaults standardUserDefaults] 
floatForKey:SKAutoCropBoxMarginWidthKey], -[[NSUserDefaults 
standardUserDefaults] floatForKey:SKAutoCropBoxMarginHeightKey]), [self 
boundsForBox:kPDFDisplayBoxCropBox]);
+    return NSIntersectionRect(NSInsetRect([self foregroundRect], 2.0 - 
[[NSUserDefaults standardUserDefaults] 
floatForKey:SKAutoCropBoxMarginWidthKey], 2.0 - [[NSUserDefaults 
standardUserDefaults] floatForKey:SKAutoCropBoxMarginHeightKey]), [self 
boundsForBox:kPDFDisplayBoxCropBox]);
 }
 
 - (NSImage *)thumbnailWithSize:(CGFloat)aSize forBox:(PDFDisplayBox)box {

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

Reply via email to