Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Build options: no card, no heading, below the build progress, switch on the right

LNPANDY5c27fd359dfb
diff --git a/frontend/Sources/NSPortBuilder/ContentView.swift b/frontend/Sources/NSPortBuilder/ContentView.swift
index b1c3f2df..77802c01 100644
--- a/frontend/Sources/NSPortBuilder/ContentView.swift
+++ b/frontend/Sources/NSPortBuilder/ContentView.swift
@@ -1257,10 +1257,10 @@ struct ContentView: View {
header
repository
inputs
- buildOptions
dependencies
if m.done { installGuide }
stagesView
+ buildOptions
logView
}
.padding(.horizontal, 22)
@@ -1387,27 +1387,28 @@ struct ContentView: View {
// ---- build options ----
- /// Output-specific switches. A Mac app runs on this Mac's GPU (which always has BC support),
- /// so the compatibility option is only shown for an iPhone build.
+ /// Output-specific switches, sitting on the window background (no card, no heading): they are
+ /// one line of text next to their control, and a boxed card around a single toggle reads
+ /// heavier than the thing it configures. A Mac app runs on this Mac's GPU, which always has BC
+ /// support, so the compatibility option is only shown for an iPhone build.
@ViewBuilder private var buildOptions: some View {
- GroupBox {
- VStack(alignment: .leading, spacing: 10) {
- sectionHeader("slider.horizontal.3", m.t("opt.title"), note: m.t("opt.note"))
- if m.target == "mac-app" {
- Text(m.t("opt.macNoBc"))
- .font(.system(size: 11.5)).foregroundStyle(.secondary)
- } else {
- Toggle(isOn: $m.bcOnCPU) {
- VStack(alignment: .leading, spacing: 2) {
- Text(m.t("opt.bc")).font(.system(size: 13))
- Text(m.t("opt.bc.note"))
- .font(.system(size: 11)).foregroundStyle(.secondary)
- }
- }
+ if m.target == "mac-app" {
+ Text(m.t("opt.macNoBc"))
+ .font(.system(size: 11.5)).foregroundStyle(.secondary)
+ } else {
+ HStack(alignment: .top, spacing: 12) {
+ VStack(alignment: .leading, spacing: 2) {
+ Text(m.t("opt.bc")).font(.system(size: 13))
+ Text(m.t("opt.bc.note"))
+ .font(.system(size: 11)).foregroundStyle(.secondary)
+ .fixedSize(horizontal: false, vertical: true)
+ }
+ Spacer(minLength: 12)
+ Toggle("", isOn: $m.bcOnCPU)
.toggleStyle(.switch)
+ .labelsHidden()
.disabled(m.running)
- }
- }.padding(8)
+ }
}
}