Revision: 24103
          http://sourceforge.net/p/bibdesk/svn/24103
Author:   hofman
Date:     2019-08-01 21:46:50 +0000 (Thu, 01 Aug 2019)
Log Message:
-----------
use default paper size for tex preview messages

Modified Paths:
--------------
    trunk/bibdesk/BDSKPreviewer.m

Modified: trunk/bibdesk/BDSKPreviewer.m
===================================================================
--- trunk/bibdesk/BDSKPreviewer.m       2019-08-01 15:02:32 UTC (rev 24102)
+++ trunk/bibdesk/BDSKPreviewer.m       2019-08-01 21:46:50 UTC (rev 24103)
@@ -426,14 +426,16 @@
 static NSData *defaultPDFDataForState(BDSKPreviewState state) {
     static NSArray *defaultPDFDataArray = nil;
     if (defaultPDFDataArray == nil) {
-        NSRect rect = NSMakeRect(0.0, 0.0, 612.0, 792.0);
+        NSRect rect = NSZeroRect;
+        rect.size = [[NSPrintInfo sharedPrintInfo] paperSize];
+        
         NSTextView *textView = [[NSTextView alloc] initWithFrame:rect];
         [textView setVerticallyResizable:YES];
         [textView setHorizontallyResizable:NO];
         [textView setTextContainerInset:NSMakeSize(20.0, 20.0)];
         [textView setFont:[NSFont userFontOfSize:0.0]];
+        
         NSMutableArray *array = [NSMutableArray array];
-        
         [array addObject:[textView dataWithPDFInsideRect:rect]];
         
         [textView setTextColor:[NSColor grayColor]];

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