Revision: 15107 http://sourceforge.net/p/skim-app/code/15107 Author: hofman Date: 2025-04-09 15:39:20 +0000 (Wed, 09 Apr 2025) Log Message: ----------- Some more SF Symbols
Modified Paths: -------------- trunk/NSImage_SKExtensions.m Modified: trunk/NSImage_SKExtensions.m =================================================================== --- trunk/NSImage_SKExtensions.m 2025-04-09 09:36:17 UTC (rev 15106) +++ trunk/NSImage_SKExtensions.m 2025-04-09 15:39:20 UTC (rev 15107) @@ -869,23 +869,30 @@ ); MAKE_IMAGE(SKImageNameToolbarShare, YES, 27.0, 19.0, - [[NSColor blackColor] set]; - NSBezierPath *path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(15.0, 11.5)]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(18.5, 11.5) toPoint:NSMakePoint(18.5, 2.5) radius:0.5]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(18.5, 2.5) toPoint:NSMakePoint(8.5, 2.5) radius:0.5]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(8.5, 2.5) toPoint:NSMakePoint(8.5, 11.5) radius:0.5]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(8.5, 11.5) toPoint:NSMakePoint(12.0, 11.5) radius:0.5]; - [path lineToPoint:NSMakePoint(12.0, 11.5)]; - [path moveToPoint:NSMakePoint(13.5, 7.0)]; - [path lineToPoint:NSMakePoint(13.5, 16.0)]; - [path stroke]; - path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(11.0, 13.5)]; - [path lineToPoint:NSMakePoint(13.5, 16.5)]; - [path lineToPoint:NSMakePoint(16.0, 13.5)]; - [path setLineCapStyle:NSRoundLineCapStyle]; - [path stroke]; + NSImage *img = nil; + if (@available(macOS 11.0, *)) + img = [NSImage imageWithSystemSymbolName:@"square.and.arrow.up" accessibilityDescription:nil]; + if (img) { + [img drawInRect:NSMakeRect(6.0, 2.0, 15.0, 17.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; + } else { + [[NSColor blackColor] set]; + NSBezierPath *path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(15.0, 11.5)]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(18.5, 11.5) toPoint:NSMakePoint(18.5, 2.5) radius:0.5]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(18.5, 2.5) toPoint:NSMakePoint(8.5, 2.5) radius:0.5]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(8.5, 2.5) toPoint:NSMakePoint(8.5, 11.5) radius:0.5]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(8.5, 11.5) toPoint:NSMakePoint(12.0, 11.5) radius:0.5]; + [path lineToPoint:NSMakePoint(12.0, 11.5)]; + [path moveToPoint:NSMakePoint(13.5, 7.0)]; + [path lineToPoint:NSMakePoint(13.5, 16.0)]; + [path stroke]; + path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(11.0, 13.5)]; + [path lineToPoint:NSMakePoint(13.5, 16.5)]; + [path lineToPoint:NSMakePoint(16.0, 13.5)]; + [path setLineCapStyle:NSRoundLineCapStyle]; + [path stroke]; + } ); MAKE_IMAGE(SKImageNameToolbarPlay, YES, 27.0, 19.0, @@ -1029,29 +1036,36 @@ ); MAKE_VECTOR_IMAGE(SKImageNameToolbarDelete, YES, 21.0, 19.0, - NSBezierPath *path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(5.75, 14.25)]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(6.25, 3.5) toPoint:NSMakePoint(14.0, 3.5) radius:1.5]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(14.0, 3.5) toPoint:NSMakePoint(14.5, 14.25) radius:1.5]; - [path lineToPoint:NSMakePoint(14.5, 14.25)]; - [path moveToPoint:NSMakePoint(4.5, 14.25)]; - [path lineToPoint:NSMakePoint(15.75, 14.25)]; - [path moveToPoint:NSMakePoint(12.5, 14.25)]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(12.5, 16.75) toPoint:NSMakePoint(7.75, 16.75) radius:1.0]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(7.75, 16.75) toPoint:NSMakePoint(8.0, 14.25) radius:1]; - [path lineToPoint:NSMakePoint(8.0, 14.25)]; - [path setLineCapStyle:NSRoundLineCapStyle]; - [path stroke]; - path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(10.125, 5.5)]; - [path lineToPoint:NSMakePoint(10.125, 12.0)]; - [path moveToPoint:NSMakePoint(8.25, 5.5)]; - [path lineToPoint:NSMakePoint(8.0, 12.0)]; - [path moveToPoint:NSMakePoint(12.0, 5.5)]; - [path lineToPoint:NSMakePoint(12.25, 12.0)]; - [path setLineWidth:0.8]; - [path setLineCapStyle:NSRoundLineCapStyle]; - [path stroke]; + NSImage *img = nil; + if (@available(macOS 11.0, *)) + img = [NSImage imageWithSystemSymbolName:@"trash" accessibilityDescription:nil]; + if (img) { + [img drawInRect:NSMakeRect(3.0, 1.0, 15.0, 17.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; + } else { + NSBezierPath *path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(5.75, 14.25)]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(6.25, 3.5) toPoint:NSMakePoint(14.0, 3.5) radius:1.5]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(14.0, 3.5) toPoint:NSMakePoint(14.5, 14.25) radius:1.5]; + [path lineToPoint:NSMakePoint(14.5, 14.25)]; + [path moveToPoint:NSMakePoint(4.5, 14.25)]; + [path lineToPoint:NSMakePoint(15.75, 14.25)]; + [path moveToPoint:NSMakePoint(12.5, 14.25)]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(12.5, 16.75) toPoint:NSMakePoint(7.75, 16.75) radius:1.0]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(7.75, 16.75) toPoint:NSMakePoint(8.0, 14.25) radius:1]; + [path lineToPoint:NSMakePoint(8.0, 14.25)]; + [path setLineCapStyle:NSRoundLineCapStyle]; + [path stroke]; + path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(10.125, 5.5)]; + [path lineToPoint:NSMakePoint(10.125, 12.0)]; + [path moveToPoint:NSMakePoint(8.25, 5.5)]; + [path lineToPoint:NSMakePoint(8.0, 12.0)]; + [path moveToPoint:NSMakePoint(12.0, 5.5)]; + [path lineToPoint:NSMakePoint(12.25, 12.0)]; + [path setLineWidth:0.8]; + [path setLineCapStyle:NSRoundLineCapStyle]; + [path stroke]; + } ); #define MAKE_BADGED_IMAGES(name) \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit