Skip to content

Commit

Permalink
Change the text color of the tab in Quick Terminal & Move xmark to th…
Browse files Browse the repository at this point in the history
…e left (like native tabs)
  • Loading branch information
sohsatoh committed Jan 26, 2025
1 parent a73f94e commit be37844
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ struct QuickTerminalTabItemView: View {

var body: some View {
HStack(spacing: 4) {
Text(tab.title)
.lineLimit(1)
.truncationMode(.tail)
.frame(minWidth: 0, maxWidth: .infinity)

Button(action: onClose) {
Image(systemName: "xmark")
.font(.system(size: 11))
.foregroundColor(isHovered ? .primary : .secondary)
}
.buttonStyle(PlainButtonStyle())
.opacity(isHovered || isSelected ? 1 : 0)
.opacity(isHovered ? 1 : 0)
.animation(.easeInOut, value: isHovered || isSelected)

Text(tab.title)
.foregroundColor(isSelected ? .primary : .secondary)
.lineLimit(1)
.truncationMode(.tail)
.frame(minWidth: 0, maxWidth: .infinity)
}
.padding(.horizontal, 8)
.frame(height: 32)
Expand Down

0 comments on commit be37844

Please sign in to comment.