Skip to content

Commit

Permalink
fix: add fallback privacy image on macOS 12-
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Jan 12, 2024
1 parent 899e6d8 commit 70466d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"scale" : "2x"
},
{
"filename" : "Privacy.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Binary file not shown.
12 changes: 7 additions & 5 deletions Easydict/Feature/PerferenceWindow/EZPrivacyViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@ - (NSString *)toolbarItemLabel {
}

- (NSImage *)toolbarItemImage {
// NSImage *privacyImage = [NSImage imageWithSystemSymbolName:@"hand.raised.square.fill" accessibilityDescription:nil];
// privacyImage = [privacyImage imageWithTintColor:[NSColor mm_colorWithHexString:@"#1296DB"]];
// privacyImage = [privacyImage resizeToSize:CGSizeMake(14, 14)];

NSImage *privacyImage = [NSImage imageNamed:@"toolbar_privacy"];
privacyImage = [NSImage ez_imageWithSymbolName:@"hand.raised.square" size:CGSizeMake(18, 16)];
/**
SF image "hand.raised.square" require macOS 12.0
Fix: https://github.com/tisfeng/Easydict/pull/212#discussion_r1437951644
*/
if (@available(macOS 12.0, *)) {
privacyImage = [NSImage ez_imageWithSymbolName:@"hand.raised.square" size:CGSizeMake(18, 16)];
}
privacyImage = [privacyImage imageWithTintColor:[NSColor ez_imageTintBlueColor]];

return privacyImage;
Expand Down

0 comments on commit 70466d8

Please sign in to comment.