mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Change the text color of the tab in Quick Terminal & Move xmark to the left (like native tabs)
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user