Revision: 15728
          http://sourceforge.net/p/skim-app/code/15728
Author:   hofman
Date:     2025-10-29 14:56:17 +0000 (Wed, 29 Oct 2025)
Log Message:
-----------
use local variable

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

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2025-10-28 17:12:47 UTC (rev 15727)
+++ trunk/SKBasePDFView.m       2025-10-29 14:56:17 UTC (rev 15728)
@@ -415,11 +415,12 @@
     
     if (scrollView) {
         CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
+        CGFloat offset = fmax(height - [scrollView verticalPageScroll], 0.5 * 
height);
         // check whether our assumptions are still correct
         if ([clipView isFlipped] == NO && NSMinY([clipView bounds]) < 
NSMinY(bounds))
-            bounds.origin.y = fmax(NSMinY([[scrollView documentView] frame]), 
NSMinY(bounds) - fmax(height - [scrollView verticalPageScroll], 0.5 * height));
+            bounds.origin.y = fmax(NSMinY([[scrollView documentView] frame]), 
NSMinY(bounds) - offset);
         else if ([clipView isFlipped] && NSMinY([clipView bounds]) > 
NSMinY(bounds))
-            bounds.origin.y = fmin(NSMaxY([[scrollView documentView] frame]) - 
NSHeight(bounds), NSMinY(bounds) + fmax(height - [scrollView 
verticalPageScroll], 0.5 * height));
+            bounds.origin.y = fmin(NSMaxY([[scrollView documentView] frame]) - 
NSHeight(bounds), NSMinY(bounds) + offset);
         else
             return;
         [clipView scrollToPoint:bounds.origin];

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