made the host symbol popover attach to the correct button

This commit is contained in:
neon443
2025-08-05 18:40:03 +01:00
parent c421d390aa
commit 703b7fe04a
2 changed files with 5 additions and 7 deletions

View File

@@ -111,11 +111,6 @@ Hostkey fingerprint is \(handler.getHostkey() ?? "nil")
""")
}
}
.popover(isPresented: $showIconPicker, attachmentAnchor: .point(.topTrailing), arrowEdge: .top) {
HostIconPicker(host: $handler.host)
.frame(minWidth: 300, minHeight: 200)
.modifier(presentationCompactPopover())
}
.toolbar {
ToolbarItem {
Button() {
@@ -124,6 +119,11 @@ Hostkey fingerprint is \(handler.getHostkey() ?? "nil")
HostSymbolPreview(symbol: handler.host.symbol, label: handler.host.label, small: true)
.id(handler.host)
}
.popover(isPresented: $showIconPicker) {
HostIconPicker(host: $handler.host)
.frame(minWidth: 300, minHeight: 200)
.modifier(presentationCompactPopover())
}
}
ToolbarItem() {

View File

@@ -91,8 +91,6 @@ struct ShellTabView: View {
}
.frame(minWidth: 300, minHeight: 400)
.modifier(presentationCompactPopover())
// .presentationDragIndicator(.visible)
// .presentationDetents([.fraction(0.4), .large])
}
}
.padding(.horizontal, 10)