Skip to content

Commit

Permalink
fix(Main): menu item image support dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji4n1ng committed Aug 3, 2019
1 parent 6c2606a commit d68fc81
Show file tree
Hide file tree
Showing 27 changed files with 145 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OpenInTerminal/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.2</string>
<string>2.0.3</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,62 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "context_menu_icon_editor-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_editor.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_editor_light.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,62 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "context_menu_icon_path-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_path.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_path_light.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,62 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "context_menu_icon_terminal-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_terminal.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "context_menu_icon_terminal_light.png",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions OpenInTerminalFinderExtension/FinderSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,24 @@ class FinderSync: FIFinderSync {
comment: "Open with default Terminal"),
action: #selector(openDefaultTerminal),
keyEquivalent: "")
openInTerminalItem.image = NSImage(named: "context_menu_icon_terminal")
let terminalIcon = NSImage(named: "context_menu_icon_terminal")!
openInTerminalItem.image = terminalIcon
menu.addItem(openInTerminalItem)

let openInEditorItem = NSMenuItem(title: NSLocalizedString("menu.open_with_default_editor",
comment: "Open with default Editor"),
action: #selector(openDefaultEditor),
keyEquivalent: "")
openInEditorItem.image = NSImage(named: "context_menu_icon_editor")
let editorIcon = NSImage(named: "context_menu_icon_editor")!
openInEditorItem.image = editorIcon
menu.addItem(openInEditorItem)

let copyPathItem = NSMenuItem(title: NSLocalizedString("menu.copy_path_to_clipboard",
comment: "Copy path to Clipboard"),
action: #selector(copyPathToClipboard),
keyEquivalent: "")
copyPathItem.image = NSImage(named: "context_menu_icon_path")
let copyPathIcon = NSImage(named: "context_menu_icon_path")
copyPathItem.image = copyPathIcon
menu.addItem(copyPathItem)

default:
Expand Down
Binary file modified Resources/sketch/icons.sketch
Binary file not shown.

0 comments on commit d68fc81

Please sign in to comment.