Revision: 15106
http://sourceforge.net/p/skim-app/code/15106
Author: hofman
Date: 2025-04-09 09:36:17 +0000 (Wed, 09 Apr 2025)
Log Message:
-----------
One more SF Symbol. Checke whether SF Symbol is available before using it.
Modified Paths:
--------------
trunk/NSImage_SKExtensions.m
Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m 2025-04-08 22:12:25 UTC (rev 15105)
+++ trunk/NSImage_SKExtensions.m 2025-04-09 09:36:17 UTC (rev 15106)
@@ -782,14 +782,21 @@
);
MAKE_IMAGE(SKImageNameToolbarNotes, YES, 27.0, 19.0,
- translate(3.0, 0.0);
- drawTextNote(nil);
- [[NSColor blackColor] setStroke];
- NSBezierPath *path = [NSBezierPath bezierPath];
- [path moveToPoint:NSMakePoint(2.0, 3.0)];
- [path lineToPoint:NSMakePoint(19.0, 3.0)];
- [path setLineWidth:2.0];
- [path stroke];
+ NSImage *img = nil;
+ if (@available(macOS 11.0, *))
+ img = [NSImage imageWithSystemSymbolName:@"pencil.tip.crop.circle"
accessibilityDescription:nil];
+ if (img) {
+ [img drawInRect:NSMakeRect(6.0, 2.0, 15.0, 15.0)
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
+ } else {
+ translate(3.0, 0.0);
+ drawTextNote(nil);
+ [[NSColor blackColor] setStroke];
+ NSBezierPath *path = [NSBezierPath bezierPath];
+ [path moveToPoint:NSMakePoint(2.0, 3.0)];
+ [path lineToPoint:NSMakePoint(19.0, 3.0)];
+ [path setLineWidth:2.0];
+ [path stroke];
+ }
);
MAKE_IMAGE(SKImageNameToolbarMoveTool, YES, 27.0, 19.0,
@@ -899,8 +906,11 @@
);
MAKE_IMAGE(SKImageNameToolbarInfo, YES, 27.0, 20.0,
- 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];
+ NSImage *img = nil;
+ if (@available(macOS 11.0, *))
+ img = [NSImage imageWithSystemSymbolName:@"info.circle"
accessibilityDescription:nil];
+ if (img) {
+ [img 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];
@@ -918,8 +928,11 @@
);
MAKE_IMAGE(SKImageNameToolbarFonts, YES, 27.0, 20.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];
+ NSImage *img = nil;
+ if (@available(macOS 11.0, *))
+ img = [NSImage imageWithSystemSymbolName:@"textformat"
accessibilityDescription:nil];
+ if (img) {
+ [img 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)];
@@ -943,8 +956,11 @@
);
MAKE_IMAGE(SKImageNameToolbarPrint, YES, 27.0, 20.0,
- if (@available(macOS 11.0, *)) {
- [[NSImage imageWithSystemSymbolName:@"printer"
accessibilityDescription:nil] drawInRect:NSMakeRect(5.0, 2.0, 18.0, 16.0)
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
+ NSImage *img = nil;
+ if (@available(macOS 11.0, *))
+ img = [NSImage imageWithSystemSymbolName:@"printer"
accessibilityDescription:nil];
+ if (img) {
+ [img 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)];
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