mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03: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