Revision: 14131
http://sourceforge.net/p/skim-app/code/14131
Author: hofman
Date: 2024-03-23 23:55:59 +0000 (Sat, 23 Mar 2024)
Log Message:
-----------
Translate context rather than setting bounds origin to zero, the content may
not be at the origin when using legacy scrollers
Modified Paths:
--------------
trunk/SKSnapshotWindowController.m
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2024-03-23 22:10:21 UTC (rev 14130)
+++ trunk/SKSnapshotWindowController.m 2024-03-23 23:55:59 UTC (rev 14131)
@@ -471,7 +471,6 @@
NSImage *image;
if (size > 0.0) {
- bounds.origin = NSZeroPoint;
shadowBlurRadius = round(size / 32.0);
shadowOffset = -ceil(shadowBlurRadius * 0.75);
if (NSHeight(bounds) > NSWidth(bounds))
@@ -482,10 +481,10 @@
[transform scaleXBy:(thumbnailSize.width - 2.0 * shadowBlurRadius) /
NSWidth(bounds) yBy:(thumbnailSize.height - 2.0 * shadowBlurRadius) /
NSHeight(bounds)];
} else if (size < 0.0) {
thumbnailSize = [[self window] frame].size;
- } else {
- bounds.origin = NSZeroPoint;
}
+ if (size >= 0.0 && NSEqualPoints(bounds.origin, NSZeroPoint) == NO)
+ [transform translateXBy:-NSMinX(bounds) yBy:-NSMinY(bounds)];
image = [[NSImage alloc] initWithSize:thumbnailSize];
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