macos: some cleanup

pull/9784/head
Mitchell Hashimoto 2025-12-11 13:59:06 -08:00
parent f71a25a621
commit 6332fb5c01
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 6 additions and 6 deletions

View File

@ -13,11 +13,6 @@ enum TerminalTabColor: Int, CaseIterable, Codable {
case teal
case graphite
static let paletteRows: [[TerminalTabColor]] = [
[.none, .blue, .purple, .pink, .red],
[.orange, .yellow, .green, .teal, .graphite],
]
var localizedName: String {
switch self {
case .none:
@ -125,7 +120,7 @@ struct TabColorMenuView: View {
var body: some View {
VStack(alignment: .leading, spacing: 3) {
ForEach(TerminalTabColor.paletteRows, id: \.self) { row in
ForEach(Self.paletteRows, id: \.self) { row in
HStack(spacing: 2) {
ForEach(row, id: \.self) { color in
TabColorSwatch(
@ -145,6 +140,11 @@ struct TabColorMenuView: View {
.padding(.bottom, 4)
}
static let paletteRows: [[TerminalTabColor]] = [
[.none, .blue, .purple, .pink, .red],
[.orange, .yellow, .green, .teal, .graphite],
]
/// Leading padding to align with the menu's icon gutter.
/// macOS 26 introduced icons in menus, requiring additional padding.
private static var leadingPadding: CGFloat {