Revision: 27831
          http://sourceforge.net/p/bibdesk/svn/27831
Author:   hofman
Date:     2022-08-23 16:14:57 +0000 (Tue, 23 Aug 2022)
Log Message:
-----------
Don't inset scroller content in zoomable pdfview, it places the scrollers above 
the scale popup. Don't inset scrollers in zoomable text view, as it does not 
have a horizontal scroller.

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

Modified: trunk/bibdesk/BDSKZoomablePDFView.m
===================================================================
--- trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-23 15:39:40 UTC (rev 27830)
+++ trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-23 16:14:57 UTC (rev 27831)
@@ -306,8 +306,6 @@
             [NSLayoutConstraint constraintWithBottomMargin:0.0 
forItem:containerView toItem:self], nil];
         [self addConstraints:constraints];
         
-        [[self scrollView] setAutomaticallyAdjustsContentInsets:NO];
-        [[self scrollView] setContentInsets:NSEdgeInsetsMake(0.0, 0.0, 
[scalePopUpButton intrinsicContentSize].height + 2.0, 0.0)];
         [self updateScrollerInsets];
         
         BDSKSetHasDefaultAppearance(self);

Modified: trunk/bibdesk/BDSKZoomableTextView.m
===================================================================
--- trunk/bibdesk/BDSKZoomableTextView.m        2022-08-23 15:39:40 UTC (rev 
27830)
+++ trunk/bibdesk/BDSKZoomableTextView.m        2022-08-23 16:14:57 UTC (rev 
27831)
@@ -50,7 +50,6 @@
 - (void)makeScalePopUpButton;
 - (void)scalePopUpAction:(id)sender;
 - (void)setScaleFactor:(CGFloat)factor adjustPopup:(BOOL)flag;
-- (void)updateScrollerInsets;
 
 @end
 
@@ -106,10 +105,6 @@
 
 #pragma mark Instance methods - scaling related
 
-- (void)updateScrollerInsets {
-    [[self enclosingScrollView] setScrollerInsets:NSEdgeInsetsMake(0.0, 
[scalePopUpButton intrinsicContentSize].width + 3.0, 0.0, 0.0)];
-}
-
 - (void)makeScalePopUpButton {
     if (scalePopUpButton == nil) {
         NSScrollView *scrollView = [self enclosingScrollView];
@@ -195,7 +190,6 @@
         
         [scrollView setAutomaticallyAdjustsContentInsets:NO];
         [scrollView setContentInsets:NSEdgeInsetsMake(0.0, 0.0, 
[scalePopUpButton intrinsicContentSize].height + 2.0, 0.0)];
-        [self updateScrollerInsets];
         
         if (RUNNING_AFTER(10_14)) {
             [scrollView setDrawsBackground:NO];
@@ -222,7 +216,6 @@
         return;
     } else {
         [self setScaleFactor:[selectedFactorObject doubleValue] 
adjustPopup:NO];
-        [self updateScrollerInsets];
     }
 }
 
@@ -259,7 +252,6 @@
        if (flag) {
             NSUInteger i = [self indexForScaleFactor:newScaleFactor];
             [scalePopUpButton selectItemAtIndex:i];
-            [self updateScrollerInsets];
             newScaleFactor = BDSKDefaultScaleMenuFactors[i];
     }
        

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