mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00

This is recommended for macOS Tahoe and all standard menu items now have associated images. This makes our app look more polished and native for macOS Tahoe. For icon choice, I tried to copy other native macOS apps as much as possible, mostly from Xcode. It looks like a lot of apps aren't updated yet. I'm absolutely open to suggestions for better icons but I think these are a good starting point. One menu change is I moved "reset font size" above "increase font size" which better matches other apps (e.g. Terminal.app).
12 lines
402 B
Swift
12 lines
402 B
Swift
import AppKit
|
|
|
|
extension NSMenuItem {
|
|
/// Sets the image property from a symbol if we want images on our menu items.
|
|
func setImageIfDesired(systemSymbolName symbol: String) {
|
|
// We only set on macOS 26 when icons on menu items became the norm.
|
|
if #available(macOS 26, *) {
|
|
image = NSImage(systemSymbolName: symbol, accessibilityDescription: title)
|
|
}
|
|
}
|
|
}
|