forked from MeloNX/MeloNX
Add HStack to fix controller UI
This commit is contained in:
parent
8ebde3f921
commit
098467f3f3
Binary file not shown.
@ -84,19 +84,20 @@ struct ContentView: View {
|
|||||||
Text("Refresh")
|
Text("Refresh")
|
||||||
}
|
}
|
||||||
ForEach(controllersList, id: \.self) { controller in
|
ForEach(controllersList, id: \.self) { controller in
|
||||||
|
HStack {
|
||||||
Button {
|
Button {
|
||||||
if currentControllers.contains(where: { $0.id == controller.id }) {
|
if currentControllers.contains(where: { $0.id == controller.id }) {
|
||||||
currentControllers.removeAll(where: { $0.id == controller.id })
|
currentControllers.removeAll(where: { $0.id == controller.id })
|
||||||
} else {
|
} else {
|
||||||
currentControllers.append(controller)
|
currentControllers.append(controller)
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Text(controller.name)
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
if currentControllers.contains(where: { $0.id == controller.id }) {
|
||||||
|
Image(systemName: "checkmark.circle.fill")
|
||||||
}
|
}
|
||||||
} label: {
|
|
||||||
Text(controller.name)
|
|
||||||
}
|
|
||||||
Spacer()
|
|
||||||
if currentControllers.contains(where: { $0.id == controller.id }) {
|
|
||||||
Image(systemName: "checkmark.circle.fill")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user