Revision: 24101
          http://sourceforge.net/p/bibdesk/svn/24101
Author:   hofman
Date:     2019-08-01 14:45:12 +0000 (Thu, 01 Aug 2019)
Log Message:
-----------
revert using scrollview magnification for text preview as it fixes the size of 
the textview

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

Modified: trunk/bibdesk/BDSKZoomableTextView.m
===================================================================
--- trunk/bibdesk/BDSKZoomableTextView.m        2019-08-01 14:21:50 UTC (rev 
24100)
+++ trunk/bibdesk/BDSKZoomableTextView.m        2019-08-01 14:45:12 UTC (rev 
24101)
@@ -45,11 +45,6 @@
 #import "NSGeometry_BDSKExtensions.h"
 #import "NSObject_BDSKExtensions.h"
 
-#if SDK_BEFORE(10_8)
-@interface NSScrollView (BDSKMountainLionDeclarations)
-@property CGFloat magnification, minMagnification, maxMagnification;
-@end
-#endif
 
 @interface BDSKZoomableTextView (BDSKPrivate)
 
@@ -195,11 +190,6 @@
         
         [self handleScrollerStyleDidChange:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleScrollerStyleDidChange:) 
name:NSPreferredScrollerStyleDidChangeNotification object:nil];
-        
-        if ([scrollView respondsToSelector:@selector(setMinMagnification:)] && 
[scrollView respondsToSelector:@selector(setMaxMagnification:)]) {
-            [scrollView setMinMagnification:0.1];
-            [scrollView setMaxMagnification:8.0];
-        }
     }
 }
 
@@ -255,14 +245,10 @@
                
                scaleFactor = newScaleFactor;
                
-        if ([[self enclosingScrollView] 
respondsToSelector:@selector(setMagnification:)]) {
-            [[self enclosingScrollView] setMagnification:scaleFactor];
-        } else {
-            [self scaleUnitSquareToSize:[self 
convertSize:NSMakeSize(scaleFactor, scaleFactor) fromView:nil]];
-            [self sizeToFit];
-            [[NSNotificationCenter defaultCenter] 
postNotificationName:NSViewFrameDidChangeNotification object:self];
-            [self setScrollPositionAsPercentage:scrollPoint]; // maintain 
approximate scroll position
-        }
+        [self scaleUnitSquareToSize:[self convertSize:NSMakeSize(scaleFactor, 
scaleFactor) fromView:nil]];
+        [self sizeToFit];
+        [[NSNotificationCenter defaultCenter] 
postNotificationName:NSViewFrameDidChangeNotification object:self];
+        [self setScrollPositionAsPercentage:scrollPoint]; // maintain 
approximate scroll position
         [[self superview] setNeedsDisplay:YES];
     }
 }

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