mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
isSelected -> isHighlighted
This commit is contained in:
@ -9,8 +9,7 @@ struct QuickTerminalTabBarView: View {
|
||||
ForEach(tabManager.tabs) { tab in
|
||||
QuickTerminalTabItemView(
|
||||
tab: tab,
|
||||
isSelected: tab.isActive,
|
||||
isSingleTab: tabManager.tabs.count == 1,
|
||||
isHighlighted: tab.isActive,
|
||||
onSelect: { tabManager.selectTab(tab) },
|
||||
onClose: { tabManager.closeTab(tab) }
|
||||
)
|
||||
|
@ -2,8 +2,7 @@ import SwiftUI
|
||||
|
||||
struct QuickTerminalTabItemView: View {
|
||||
@ObservedObject var tab: QuickTerminalTab
|
||||
let isSelected: Bool
|
||||
let isSingleTab: Bool
|
||||
let isHighlighted: Bool
|
||||
let onSelect: () -> Void
|
||||
let onClose: () -> Void
|
||||
|
||||
@ -21,7 +20,7 @@ struct QuickTerminalTabItemView: View {
|
||||
.animation(.easeInOut, value: isHovered)
|
||||
|
||||
Text(tab.title)
|
||||
.foregroundColor(isSelected ? .primary : .secondary)
|
||||
.foregroundColor(isHighlighted ? .primary : .secondary)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.tail)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@ -31,7 +30,7 @@ struct QuickTerminalTabItemView: View {
|
||||
.background(
|
||||
Rectangle()
|
||||
.fill(
|
||||
isSelected && !isSingleTab
|
||||
isHighlighted
|
||||
? Color(NSColor.controlBackgroundColor)
|
||||
: (isHovered ? Color(NSColor.underPageBackgroundColor) : Color(NSColor.windowBackgroundColor)))
|
||||
)
|
||||
|
Reference in New Issue
Block a user