From 6db965ed53bde497fe796296fbe8cfc6e44b89f3 Mon Sep 17 00:00:00 2001 From: ReffWu Date: Fri, 11 Sep 2026 15:36:10 -0400 Subject: [PATCH] Put the window header in the title bar row The header sat below the hidden title bar, so the window opened with an empty 32 point strip above a 40 point header, and the back button kept the 76 point inset meant for clearing the window buttons one row higher. The header now fills the title bar area, sized from the safe area, so the back button, title and gear line up with the window buttons. --- Sources/MainView.swift | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Sources/MainView.swift b/Sources/MainView.swift index 56e1561..ca5e20f 100644 --- a/Sources/MainView.swift +++ b/Sources/MainView.swift @@ -16,10 +16,14 @@ struct MainView: View { @ObservedObject var navigator: Navigator var body: some View { - VStack(spacing: 0) { - header - Divider().opacity(0.6) - content + GeometryReader { proxy in + VStack(spacing: 0) { + header + .frame(height: proxy.safeAreaInsets.top) + Divider().opacity(0.6) + content + } + .ignoresSafeArea(.container, edges: .top) } .frame(width: 460, height: 580) } @@ -44,7 +48,7 @@ struct MainView: View { .padding(.leading, 76) .padding(.trailing, 12) } - .frame(height: 40) + .frame(maxHeight: .infinity) .background(HeaderMaterial().ignoresSafeArea()) }