mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-05 12:57:50 +00:00
macos: limit URL preview to a single line, ellipses in middle
This commit is contained in:
@@ -159,6 +159,8 @@ extension Ghostty {
|
||||
Text(verbatim: url)
|
||||
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
|
||||
.background(.background)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.middle)
|
||||
.opacity(isHoveringURLLeft ? 0 : 1)
|
||||
.onHover(perform: { hovering in
|
||||
isHoveringURLLeft = hovering
|
||||
@@ -175,6 +177,8 @@ extension Ghostty {
|
||||
Text(verbatim: url)
|
||||
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
|
||||
.background(.background)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.middle)
|
||||
.opacity(isHoveringURLLeft ? 1 : 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user