macos: show tab color as header for menu item so its not grey
parent
89bdee447f
commit
4d757f0f28
|
|
@ -120,6 +120,9 @@ struct TabColorMenuView: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 3) {
|
||||
Text("Tab Color")
|
||||
.padding(.bottom, 2)
|
||||
|
||||
ForEach(Self.paletteRows, id: \.self) { row in
|
||||
HStack(spacing: 2) {
|
||||
ForEach(row, id: \.self) { color in
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ private struct TabColorIndicatorView: View {
|
|||
extension TerminalWindow {
|
||||
private static let closeTabsOnRightMenuItemIdentifier = NSUserInterfaceItemIdentifier("com.mitchellh.ghostty.closeTabsOnTheRightMenuItem")
|
||||
private static let tabColorSeparatorIdentifier = NSUserInterfaceItemIdentifier("com.mitchellh.ghostty.tabColorSeparator")
|
||||
private static let tabColorHeaderIdentifier = NSUserInterfaceItemIdentifier("com.mitchellh.ghostty.tabColorHeader")
|
||||
|
||||
private static let tabColorPaletteIdentifier = NSUserInterfaceItemIdentifier("com.mitchellh.ghostty.tabColorPalette")
|
||||
|
||||
func configureTabContextMenuIfNeeded(_ menu: NSMenu) {
|
||||
|
|
@ -722,7 +722,6 @@ extension TerminalWindow {
|
|||
private func appendTabColorSection(to menu: NSMenu, target: TerminalController?) {
|
||||
menu.removeItems(withIdentifiers: [
|
||||
Self.tabColorSeparatorIdentifier,
|
||||
Self.tabColorHeaderIdentifier,
|
||||
Self.tabColorPaletteIdentifier
|
||||
])
|
||||
|
||||
|
|
@ -730,13 +729,6 @@ extension TerminalWindow {
|
|||
separator.identifier = Self.tabColorSeparatorIdentifier
|
||||
menu.addItem(separator)
|
||||
|
||||
let headerItem = NSMenuItem()
|
||||
headerItem.identifier = Self.tabColorHeaderIdentifier
|
||||
headerItem.title = "Tab Color"
|
||||
headerItem.isEnabled = false
|
||||
headerItem.setImageIfDesired(systemSymbolName: "eyedropper")
|
||||
menu.addItem(headerItem)
|
||||
|
||||
let paletteItem = NSMenuItem()
|
||||
paletteItem.identifier = Self.tabColorPaletteIdentifier
|
||||
paletteItem.view = makeTabColorPaletteView(
|
||||
|
|
|
|||
Loading…
Reference in New Issue