Revision: 15104 http://sourceforge.net/p/skim-app/code/15104 Author: hofman Date: 2025-04-08 21:49:40 +0000 (Tue, 08 Apr 2025) Log Message: ----------- Use some SF symbols for some toolbar items
Modified Paths: -------------- trunk/NSImage_SKExtensions.m Modified: trunk/NSImage_SKExtensions.m =================================================================== --- trunk/NSImage_SKExtensions.m 2025-04-08 16:27:39 UTC (rev 15103) +++ trunk/NSImage_SKExtensions.m 2025-04-08 21:49:40 UTC (rev 15104) @@ -899,24 +899,32 @@ ); MAKE_IMAGE(SKImageNameToolbarInfo, YES, 27.0, 20.0, - NSBezierPath *path = [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(7.5, 4.5, 12.0, 12.0)]; - [path stroke]; - path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(12.0, 7.4)]; - [path lineToPoint:NSMakePoint(15.3, 7.4)]; - [path moveToPoint:NSMakePoint(13.7, 7.4)]; - [path lineToPoint:NSMakePoint(13.7, 11.2)]; - [path lineToPoint:NSMakePoint(12.2, 11.2)]; - [path setLineWidth:0.8]; - [path stroke]; - path = [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(12.7, 12.8, 1.5, 1.5)]; - [path fill]; + if (@available(macOS 11.0, *)) { + [[NSImage imageWithSystemSymbolName:@"info.circle" accessibilityDescription:nil] drawInRect:NSMakeRect(6.0, 3.0, 15.0, 15.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; + } else { + NSBezierPath *path = [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(7.5, 4.5, 12.0, 12.0)]; + [path stroke]; + path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(12.0, 7.4)]; + [path lineToPoint:NSMakePoint(15.3, 7.4)]; + [path moveToPoint:NSMakePoint(13.7, 7.4)]; + [path lineToPoint:NSMakePoint(13.7, 11.2)]; + [path lineToPoint:NSMakePoint(12.2, 11.2)]; + [path setLineWidth:0.8]; + [path stroke]; + path = [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(12.7, 12.8, 1.5, 1.5)]; + [path fill]; + } ); MAKE_IMAGE(SKImageNameToolbarFonts, YES, 27.0, 20.0, - [[NSColor blackColor] setFill]; - [NSBezierPath fillRect:NSMakeRect(4.0, 1.0, 19.0, 19.0)]; - [[NSImage imageNamed:NSImageNameFontPanel] drawInRect:NSMakeRect(4.0, 1.0, 19.0, 19.0) fromRect:NSZeroRect operation:NSCompositingOperationDestinationAtop fraction:1.0]; + if (@available(macOS 11.0, *)) { + [[NSImage imageWithSystemSymbolName:@"textformat" accessibilityDescription:nil] drawInRect:NSMakeRect(4.0, 4.0, 18.0, 12.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; + } else { + [[NSColor blackColor] setFill]; + [NSBezierPath fillRect:NSMakeRect(4.0, 1.0, 19.0, 19.0)]; + [[NSImage imageNamed:NSImageNameFontPanel] drawInRect:NSMakeRect(4.0, 1.0, 19.0, 19.0) fromRect:NSZeroRect operation:NSCompositingOperationDestinationAtop fraction:1.0]; + } ); MAKE_IMAGE(SKImageNameToolbarLines, YES, 27.0, 20.0, @@ -935,27 +943,31 @@ ); MAKE_IMAGE(SKImageNameToolbarPrint, YES, 27.0, 20.0, - NSBezierPath *path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(7.5, 15.0)]; - [path lineToPoint:NSMakePoint(7.5, 17.5)]; - [path lineToPoint:NSMakePoint(19.5, 17.5)]; - [path lineToPoint:NSMakePoint(19.5, 15.0)]; - [[NSColor blackColor] set]; - [path stroke]; - path = [NSBezierPath bezierPath]; - [path moveToPoint:NSMakePoint(5.0, 14.0)]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(24.0, 14.0) toPoint:NSMakePoint(24.0, 4.0) radius:2.0]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(24.0, 4.0) toPoint:NSMakePoint(20.0, 4.0) radius:1.0]; - [path lineToPoint:NSMakePoint(20.0, 4.0)]; - [path lineToPoint:NSMakePoint(20.0, 1.0)]; - [path lineToPoint:NSMakePoint(7.0, 1.0)]; - [path lineToPoint:NSMakePoint(7.0, 4.0)]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(3.0, 4.0) toPoint:NSMakePoint(3.0, 14.0) radius:1.0]; - [path appendBezierPathWithArcFromPoint:NSMakePoint(3.0, 14.0) toPoint:NSMakePoint(5.0, 14.0) radius:2.0]; - [path closePath]; - [path appendBezierPathWithRect:NSMakeRect(8.0, 2.0, 11.0, 8.0)]; - [path setWindingRule:NSEvenOddWindingRule]; - [path fill]; + if (@available(macOS 11.0, *)) { + [[NSImage imageWithSystemSymbolName:@"printer.fill" accessibilityDescription:nil] drawInRect:NSMakeRect(5.0, 2.0, 18.0, 16.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; + } else { + NSBezierPath *path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(7.5, 15.0)]; + [path lineToPoint:NSMakePoint(7.5, 17.5)]; + [path lineToPoint:NSMakePoint(19.5, 17.5)]; + [path lineToPoint:NSMakePoint(19.5, 15.0)]; + [[NSColor blackColor] set]; + [path stroke]; + path = [NSBezierPath bezierPath]; + [path moveToPoint:NSMakePoint(5.0, 14.0)]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(24.0, 14.0) toPoint:NSMakePoint(24.0, 4.0) radius:2.0]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(24.0, 4.0) toPoint:NSMakePoint(20.0, 4.0) radius:1.0]; + [path lineToPoint:NSMakePoint(20.0, 4.0)]; + [path lineToPoint:NSMakePoint(20.0, 1.0)]; + [path lineToPoint:NSMakePoint(7.0, 1.0)]; + [path lineToPoint:NSMakePoint(7.0, 4.0)]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(3.0, 4.0) toPoint:NSMakePoint(3.0, 14.0) radius:1.0]; + [path appendBezierPathWithArcFromPoint:NSMakePoint(3.0, 14.0) toPoint:NSMakePoint(5.0, 14.0) radius:2.0]; + [path closePath]; + [path appendBezierPathWithRect:NSMakeRect(8.0, 2.0, 11.0, 8.0)]; + [path setWindingRule:NSEvenOddWindingRule]; + [path fill]; + } ); MAKE_VECTOR_IMAGE(SKImageNameToolbarNewFolder, YES, 21.0, 19.0, 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