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
|
ForEach(tabManager.tabs) { tab in
|
||||||
QuickTerminalTabItemView(
|
QuickTerminalTabItemView(
|
||||||
tab: tab,
|
tab: tab,
|
||||||
isSelected: tab.isActive,
|
isHighlighted: tab.isActive,
|
||||||
isSingleTab: tabManager.tabs.count == 1,
|
|
||||||
onSelect: { tabManager.selectTab(tab) },
|
onSelect: { tabManager.selectTab(tab) },
|
||||||
onClose: { tabManager.closeTab(tab) }
|
onClose: { tabManager.closeTab(tab) }
|
||||||
)
|
)
|
||||||
|
@ -2,8 +2,7 @@ import SwiftUI
|
|||||||
|
|
||||||
struct QuickTerminalTabItemView: View {
|
struct QuickTerminalTabItemView: View {
|
||||||
@ObservedObject var tab: QuickTerminalTab
|
@ObservedObject var tab: QuickTerminalTab
|
||||||
let isSelected: Bool
|
let isHighlighted: Bool
|
||||||
let isSingleTab: Bool
|
|
||||||
let onSelect: () -> Void
|
let onSelect: () -> Void
|
||||||
let onClose: () -> Void
|
let onClose: () -> Void
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ struct QuickTerminalTabItemView: View {
|
|||||||
.animation(.easeInOut, value: isHovered)
|
.animation(.easeInOut, value: isHovered)
|
||||||
|
|
||||||
Text(tab.title)
|
Text(tab.title)
|
||||||
.foregroundColor(isSelected ? .primary : .secondary)
|
.foregroundColor(isHighlighted ? .primary : .secondary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
.frame(minWidth: 0, maxWidth: .infinity)
|
.frame(minWidth: 0, maxWidth: .infinity)
|
||||||
@ -31,7 +30,7 @@ struct QuickTerminalTabItemView: View {
|
|||||||
.background(
|
.background(
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.fill(
|
.fill(
|
||||||
isSelected && !isSingleTab
|
isHighlighted
|
||||||
? Color(NSColor.controlBackgroundColor)
|
? Color(NSColor.controlBackgroundColor)
|
||||||
: (isHovered ? Color(NSColor.underPageBackgroundColor) : Color(NSColor.windowBackgroundColor)))
|
: (isHovered ? Color(NSColor.underPageBackgroundColor) : Color(NSColor.windowBackgroundColor)))
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user