Func is one button with a dark panel of functions; Translator (⌃⌥R or Func): selected text RU<->EN via macOS Translation or claude Haiku, card holds the notch open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-07 15:57:06 +03:00
parent 9570dc190f
commit e11d06c73e
7 changed files with 356 additions and 13 deletions
+14
View File
@@ -270,6 +270,7 @@ struct TabChip: View {
}
.padding(14)
.frame(width: 260)
.notchPopoverStyle()
}
}
}
@@ -303,6 +304,7 @@ struct NewTabButton: View {
}
}
.padding(10)
.notchPopoverStyle()
}
}
@@ -331,3 +333,15 @@ struct NewTabButton: View {
.disabled(state.tabs.count >= AppState.maxTabs)
}
}
extension View {
/// Popovers out of the notch: dark like the island, readable text whatever the
/// island's foreground colour is.
func notchPopoverStyle() -> some View {
self
.foregroundColor(Color(hex: "#F5F6F8"))
.background(Color(hex: "#16171B"))
.environment(\.colorScheme, .dark)
}
}