mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Consistency tweaks for Catalyst
This commit is contained in:
parent
c254508983
commit
4f807419f6
1 changed files with 15 additions and 17 deletions
|
|
@ -16,8 +16,8 @@ struct MetricsColumnDetail: View {
|
|||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
List {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section("Chart") {
|
||||
ForEach(seriesList) { series in
|
||||
HStack {
|
||||
|
|
@ -57,25 +57,23 @@ struct MetricsColumnDetail: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// More friendly to tap a button to dismiss on these devices
|
||||
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||
Spacer()
|
||||
Button {
|
||||
self.dismiss()
|
||||
} label: {
|
||||
Text("Done")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
.listStyle(.insetGrouped)
|
||||
#if targetEnvironment(macCatalyst)
|
||||
Spacer()
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("close", systemImage: "xmark")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding(.bottom)
|
||||
#endif
|
||||
}
|
||||
.presentationDetents([.medium, .large], selection: $currentDetent)
|
||||
.presentationContentInteraction(.scrolls)
|
||||
.presentationDragIndicator(
|
||||
!(UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac) ? .visible : .hidden)
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationBackgroundInteraction(.enabled(upThrough: .medium))
|
||||
.interactiveDismissDisabled(false)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue