From 1b0fea044f4c3407d6db2035c184b0a041bbc6df Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 30 Oct 2023 12:01:10 -0700 Subject: [PATCH] macos: move debug view --- .../Features/Primary Window/PrimaryView.swift | 31 ------------------- .../Features/Terminal/TerminalView.swift | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/macos/Sources/Features/Primary Window/PrimaryView.swift b/macos/Sources/Features/Primary Window/PrimaryView.swift index 9cff1c93f..f58a168f3 100644 --- a/macos/Sources/Features/Primary Window/PrimaryView.swift +++ b/macos/Sources/Features/Primary Window/PrimaryView.swift @@ -156,34 +156,3 @@ struct PrimaryView: View { } } } - -struct DebugBuildWarningView: View { - @State private var isPopover = false - - var body: some View { - HStack { - Spacer() - - Image(systemName: "exclamationmark.triangle.fill") - .foregroundColor(.yellow) - - Text("You're running a debug build of Ghostty! Performance will be degraded.") - .padding(.all, 8) - .popover(isPresented: $isPopover, arrowEdge: .bottom) { - Text(""" - Debug builds of Ghostty are very slow and you may experience - performance problems. Debug builds are only recommended during - development. - """) - .padding(.all) - } - - Spacer() - } - .background(Color(.windowBackgroundColor)) - .frame(maxWidth: .infinity) - .onTapGesture { - isPopover = true - } - } -} diff --git a/macos/Sources/Features/Terminal/TerminalView.swift b/macos/Sources/Features/Terminal/TerminalView.swift index 576e394af..9a2f429c1 100644 --- a/macos/Sources/Features/Terminal/TerminalView.swift +++ b/macos/Sources/Features/Terminal/TerminalView.swift @@ -96,3 +96,34 @@ struct TerminalView: View { self.delegate?.lastSurfaceDidClose() } } + +struct DebugBuildWarningView: View { + @State private var isPopover = false + + var body: some View { + HStack { + Spacer() + + Image(systemName: "exclamationmark.triangle.fill") + .foregroundColor(.yellow) + + Text("You're running a debug build of Ghostty! Performance will be degraded.") + .padding(.all, 8) + .popover(isPresented: $isPopover, arrowEdge: .bottom) { + Text(""" + Debug builds of Ghostty are very slow and you may experience + performance problems. Debug builds are only recommended during + development. + """) + .padding(.all) + } + + Spacer() + } + .background(Color(.windowBackgroundColor)) + .frame(maxWidth: .infinity) + .onTapGesture { + isPopover = true + } + } +}