Revision: 14150
http://sourceforge.net/p/skim-app/code/14150
Author: hofman
Date: 2024-03-27 10:36:59 +0000 (Wed, 27 Mar 2024)
Log Message:
-----------
use corner radius of 10 on older systems
Modified Paths:
--------------
trunk/SKSnapshotWindowController.m
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2024-03-27 10:06:40 UTC (rev 14149)
+++ trunk/SKSnapshotWindowController.m 2024-03-27 10:36:59 UTC (rev 14150)
@@ -498,8 +498,11 @@
[image lockFocus];
- if (size < 0.0)
- [[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(0.0, 0.0,
thumbnailSize.width, thumbnailSize.height + 24.0) xRadius:12.0 yRadius:12.0]
addClip];
+ if (size < 0.0) {
+ CGFloat r = 10.0;
+ if (@available(macOS 12.0, *)) r = 12.0;
+ [[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(0.0, 0.0,
thumbnailSize.width, thumbnailSize.height + r) xRadius:r yRadius:r] addClip];
+ }
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
[transform concat];
@@ -600,9 +603,11 @@
}
static void roundCornersAndApplyFiltersToImageRep(NSBitmapImageRep *imageRep,
NSArray *filters, NSRect rect) {
- NSRect r = {NSZeroPoint, [imageRep size]};
- NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:r
xRadius:12.0 yRadius:12.0];
- [path appendBezierPathWithRect:r];
+ NSRect bounds = {NSZeroPoint, [imageRep size]};
+ CGFloat r = 10.0;
+ if (@available(macOS 12.0, *)) r = 12.0;
+ NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:bounds
xRadius:r yRadius:r];
+ [path appendBezierPathWithRect:bounds];
[path setWindingRule:NSEvenOddWindingRule];
CIImage *image = nil;
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