diff --git a/Boxer/BXBezelController.m b/Boxer/BXBezelController.m index f9672a7b6..76cdedb9d 100644 --- a/Boxer/BXBezelController.m +++ b/Boxer/BXBezelController.m @@ -48,20 +48,29 @@ @implementation BXBezelController + (NSImage *) bezelIconForDrive: (BXDrive *)drive { - NSString *iconName; + NSImage *icon; switch (drive.type) { case BXDriveCDROM: - iconName = @"CDROMTemplate"; + if (@available(macOS 13.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"opticaldisc.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"CDROMTemplate"]; + } break; case BXDriveFloppyDisk: - iconName = @"DisketteTemplate"; + icon = [NSImage imageNamed: @"DisketteTemplate"]; break; default: - iconName = @"HardDiskTemplate"; + if (@available(macOS 11.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"internaldrive.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"HardDiskTemplate"]; + } + break; } - return [NSImage imageNamed: iconName]; + return icon; } + (id) controller diff --git a/Boxer/DOS window/BXLaunchPanelController.m b/Boxer/DOS window/BXLaunchPanelController.m index 0ef22589a..03fde1daf 100644 --- a/Boxer/DOS window/BXLaunchPanelController.m +++ b/Boxer/DOS window/BXLaunchPanelController.m @@ -460,20 +460,29 @@ - (NSDictionary *) _listItemForProgramAtURL: (NSURL *)URL + (NSImage *) _headingIconForDriveType: (BXDriveType)type { - NSString *iconName; + NSImage *icon; switch (type) { case BXDriveCDROM: - iconName = @"CDROMTemplate"; + if (@available(macOS 13.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"opticaldisc.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"CDROMTemplate"]; + } break; case BXDriveFloppyDisk: - iconName = @"DisketteTemplate"; + icon = [NSImage imageNamed: @"DisketteTemplate"]; break; default: - iconName = @"HardDiskTemplate"; + if (@available(macOS 11.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"internaldrive.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"HardDiskTemplate"]; + } + break; } - return [NSImage imageNamed: iconName]; + return icon; } - (NSDictionary *) _listItemForDrive: (BXDrive *)drive diff --git a/Boxer/Inspector Panel/BXDriveItem.m b/Boxer/Inspector Panel/BXDriveItem.m index 947917955..e6ab994e6 100644 --- a/Boxer/Inspector Panel/BXDriveItem.m +++ b/Boxer/Inspector Panel/BXDriveItem.m @@ -136,20 +136,29 @@ + (NSSet *) keyPathsForValuesAffectingMounted { return [NSSet setWithObject: @"d - (NSImage *) driveImage { - NSString *iconName; + NSImage *icon; switch (self.drive.type) { case BXDriveCDROM: - iconName = @"CDROMTemplate"; + if (@available(macOS 13.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"opticaldisc.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"CDROMTemplate"]; + } break; case BXDriveFloppyDisk: - iconName = @"DisketteTemplate"; + icon = [NSImage imageNamed: @"DisketteTemplate"]; break; default: - iconName = @"HardDiskTemplate"; + if (@available(macOS 11.0, *)) { + icon = [NSImage imageWithSystemSymbolName: @"internaldrive.fill" accessibilityDescription: nil]; + } else { + icon = [NSImage imageNamed: @"HardDiskTemplate"]; + } + break; } - return [NSImage imageNamed: iconName]; + return icon; } + (NSSet *) keyPathsForValuesAffectingDriveImage { return [NSSet setWithObject: @"drive.type"]; } diff --git a/Resources/Base.lproj/InspectorDriveItem.xib b/Resources/Base.lproj/InspectorDriveItem.xib index a7d26a22b..3c48deda0 100644 --- a/Resources/Base.lproj/InspectorDriveItem.xib +++ b/Resources/Base.lproj/InspectorDriveItem.xib @@ -1,8 +1,8 @@ - + - + @@ -28,7 +28,7 @@ - + @@ -40,11 +40,11 @@ - - - + + diff --git a/Resources/Boxer only.xcassets/Inspector/EjectFreestandingTemplate.imageset/Contents.json b/Resources/Boxer only.xcassets/Inspector/EjectFreestandingTemplate.imageset/Contents.json index 2cd4c71ac..ef177dce3 100644 --- a/Resources/Boxer only.xcassets/Inspector/EjectFreestandingTemplate.imageset/Contents.json +++ b/Resources/Boxer only.xcassets/Inspector/EjectFreestandingTemplate.imageset/Contents.json @@ -10,6 +10,7 @@ "version" : 1 }, "properties" : { + "preserves-vector-representation" : true, "template-rendering-intent" : "template" } } diff --git a/Resources/Boxer only.xcassets/Inspector/InsertFreestandingTemplate.imageset/Contents.json b/Resources/Boxer only.xcassets/Inspector/InsertFreestandingTemplate.imageset/Contents.json index aebb0239c..d09039855 100644 --- a/Resources/Boxer only.xcassets/Inspector/InsertFreestandingTemplate.imageset/Contents.json +++ b/Resources/Boxer only.xcassets/Inspector/InsertFreestandingTemplate.imageset/Contents.json @@ -10,6 +10,7 @@ "version" : 1 }, "properties" : { + "preserves-vector-representation" : true, "template-rendering-intent" : "template" } }