Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82f0a0e

Browse files
committed
fix: correct remote file picker dropdown chevron alignment
1 parent c19b39a commit 82f0a0e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Coder-Desktop/Coder-Desktop/Views/FileSync/FilePicker.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,18 @@ struct FilePickerEntry: View {
123123
} label: {
124124
Label {
125125
Text(entry.name)
126-
ZStack {
127-
CircularProgressView(value: nil, strokeWidth: 2, diameter: 10)
128-
.opacity(entry.isLoading && entry.error == nil ? 1 : 0)
129-
Image(systemName: "exclamationmark.triangle.fill")
130-
.opacity(entry.error != nil ? 1 : 0)
131-
}
126+
// The NSView within the CircularProgressView breaks
127+
// the chevron alignment within the DisclosureGroup view.
128+
// So, we overlay the progressview with a manual offset
129+
.padding(.trailing, 20)
130+
.overlay(alignment: .trailing) {
131+
ZStack {
132+
CircularProgressView(value: nil, strokeWidth: 2, diameter: 10)
133+
.opacity(entry.isLoading && entry.error == nil ? 1 : 0)
134+
Image(systemName: "exclamationmark.triangle.fill")
135+
.opacity(entry.error != nil ? 1 : 0)
136+
}
137+
}
132138
} icon: {
133139
Image(systemName: "folder")
134140
}.help(entry.error != nil ? entry.error!.description : entry.absolute_path)

0 commit comments

Comments
 (0)