mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-10-26 19:10:11 +03:00
Improve fileURL display in document inspector
This commit is contained in:
parent
27fd054ff2
commit
51f73059fa
@ -3,6 +3,11 @@
|
||||
4.8.5 (unreleased)
|
||||
--------------------------
|
||||
|
||||
### Improvements
|
||||
|
||||
- Improve the file path display in the document inspector.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that the application crashed by opening the Appearance settings pane when the font the user set did not exist.
|
||||
|
@ -152,9 +152,12 @@ private struct DocumentFileView: View {
|
||||
LabeledContent(String(localized: "Full Path", table: "Document", comment: "label in document inspector")) {
|
||||
if let fileURL = self.fileURL {
|
||||
HStack(alignment: .lastTextBaseline, spacing: 0) {
|
||||
Text(fileURL, format: .url)
|
||||
Text(fileURL, format: .url.scheme(.never))
|
||||
.lineLimit(5)
|
||||
.truncationMode(.middle)
|
||||
.textSelection(.enabled)
|
||||
.foregroundStyle(.primary)
|
||||
.help(fileURL.formatted(.url.scheme(.never)))
|
||||
Button(String(localized: "Show in Finder", table: "Document"), systemImage: "arrow.forward") {
|
||||
NSWorkspace.shared.activateFileViewerSelecting([fileURL])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user