Revision: 14076
http://sourceforge.net/p/skim-app/code/14076
Author: hofman
Date: 2024-02-28 23:37:15 +0000 (Wed, 28 Feb 2024)
Log Message:
-----------
updaate scroll view scrollers after scrolling
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2024-02-28 22:40:37 UTC (rev 14075)
+++ trunk/SKBasePDFView.m 2024-02-28 23:37:15 UTC (rev 14076)
@@ -312,6 +312,7 @@
}
- (void)scrollPageUp:(id)sender {
+ NSScrollView *scrollView;
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
CGFloat bottom = 0.0;
@@ -318,6 +319,8 @@
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
+ scrollView = [self scrollView];
+ clipView = [scrollView contentView];
clipView = [[self scrollView] contentView];
bounds = [clipView bounds];
NSView *docView = [self documentView];
@@ -332,10 +335,12 @@
CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
bounds.origin.y = fmax(bottom, NSMinY(bounds) - height + 10.0);
[clipView scrollToPoint:bounds.origin];
+ [scrollView reflectScrolledClipView:clipView];
}
}
- (void)scrollPageDown:(id)sender {
+ NSScrollView *scrollView;
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
CGFloat top = 0.0;
@@ -342,7 +347,8 @@
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
- clipView = [[self scrollView] contentView];
+ scrollView = [self scrollView];
+ clipView = [scrollView contentView];
bounds = [clipView bounds];
NSView *docView = [self documentView];
top = NSMaxY([docView convertRect:[docView bounds] toView:clipView]);
@@ -356,6 +362,7 @@
CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
bounds.origin.y = fmin(top - height, NSMinY(bounds) + height - 10.0);
[clipView scrollToPoint:bounds.origin];
+ [scrollView reflectScrolledClipView:clipView];
}
}
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