Change the text color of the tab in Quick Terminal & Move xmark to the left (like native tabs)

This commit is contained in:
Soh Satoh
2025-01-26 18:58:23 +09:00
parent a73f94e103
commit 98a0e07cce

View File

@ -11,19 +11,20 @@ struct QuickTerminalTabItemView: View {
var body: some View { var body: some View {
HStack(spacing: 4) { HStack(spacing: 4) {
Text(tab.title)
.lineLimit(1)
.truncationMode(.tail)
.frame(minWidth: 0, maxWidth: .infinity)
Button(action: onClose) { Button(action: onClose) {
Image(systemName: "xmark") Image(systemName: "xmark")
.font(.system(size: 11)) .font(.system(size: 11))
.foregroundColor(isHovered ? .primary : .secondary) .foregroundColor(isHovered ? .primary : .secondary)
} }
.buttonStyle(PlainButtonStyle()) .buttonStyle(PlainButtonStyle())
.opacity(isHovered || isSelected ? 1 : 0) .opacity(isHovered ? 1 : 0)
.animation(.easeInOut, value: isHovered || isSelected) .animation(.easeInOut, value: isHovered)
Text(tab.title)
.foregroundColor(isSelected ? .primary : .secondary)
.lineLimit(1)
.truncationMode(.tail)
.frame(minWidth: 0, maxWidth: .infinity)
} }
.padding(.horizontal, 8) .padding(.horizontal, 8)
.frame(height: 32) .frame(height: 32)