+- (void)drawIconForObject:(QSObject *)object withFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+ NSImage *image = [object icon];
+ NSString *iconName = nil;
+ NSImageSymbolConfiguration *iconConfig = nil;
+ if ([[image name] isEqualToString: @"defaultAction"]) {
+ iconName = @"gearshape.circle";
+ }
+ else if ([[image name] isEqualToString: @"Find"]) {
+ iconName = @"magnifyingglass";
+ }
+ else if ([[image name] isEqualToString: @"Object"]) {
+ iconName = @"cube.transparent";
+ iconConfig = [NSImageSymbolConfiguration configurationWithHierarchicalColor:[NSColor controlAccentColor]];
+ }
+ else if ([[image name] isEqualToString: @"ContactAddress"]) {
+ iconName = @"mappin.circle";
+ }
+ else if ([[image name] isEqualToString: @"ContactEmail"]) {
+ iconName = @"envelope.circle";
+ }
+ else if ([[image name] isEqualToString: @"ContactPhone"]) {
+ iconName = @"phone.circle";
+ }
+ else if ([[image name] isEqualToString: @"DefaultBookmarkIcon"]) {
+ iconName = @"link.circle";
+ }
+ else if ([[image name] isEqualToString: @"Catalog"]) {
+ iconName = @"sparkles.rectangle.stack";
+ }
+ else if ([[image name] isEqualToString: @"Triggers"]) {
+ iconName = @"bolt.fill";
+ }
+
+
+ if (iconName != nil) {
+ NSImage *newIcon = [NSImage imageWithSystemSymbolName:iconName accessibilityDescription:[image name]];
+
+ if (iconConfig == nil) {
+ NSArray *colors = [NSArray arrayWithObjects:[NSColor textColor], [NSColor controlAccentColor], nil];
+ iconConfig = [NSImageSymbolConfiguration configurationWithPaletteColors:colors];
+ }
+
+ QSObject *newObject = [QSObject objectWithName:[object name]];
+ [newObject setIcon:[newIcon imageWithSymbolConfiguration:iconConfig]];
+ [newObject setIconLoaded:[object iconLoaded]];
+ return [super drawIconForObject: newObject withFrame:cellFrame inView:controlView];
+ }
+
+ [super drawIconForObject: object withFrame:cellFrame inView:controlView];
+}
+