Skip to content

Commit 16c3162

Browse files
committed
checkpoint: still not draggable, toolbar to the left.. I keep rebuild... — ContentView.swift
Auto-checkpoint after successful build (1 file). Task: still not draggable, toolbar to the left.. I keep rebuilding same result Changed: M Agent/Views/ContentView/ContentView.swift
1 parent 28eb467 commit 16c3162

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎Agent/Views/ContentView/ContentView.swift‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,22 @@ struct ContentView: View {
154154
.onTapGesture {
155155
NSApp.keyWindow?.makeFirstResponder(nil)
156156
}
157-
.toolbarBackground(Color(nsColor: .windowBackgroundColor), for: .windowToolbar)
157+
// NOTE: no .toolbarBackground(Color…) here — a ShapeStyle toolbar background
158+
// installs a full-width hit-testable hosting view over the titlebar, which
159+
// swallows the drag events that move the window.
158160
.toolbar {
159161
ToolbarItemGroup(placement: .navigation) {
160162
HeaderStatusView(viewModel: viewModel)
161163
}
164+
// Flexible space pushes the action buttons to the trailing edge and
165+
// stays draggable (native flexible-space item).
166+
if #available(macOS 26.0, *) {
167+
ToolbarSpacer(.flexible, placement: .automatic)
168+
} else {
169+
ToolbarItem(placement: .automatic) { Spacer() }
170+
}
162171
ToolbarItemGroup(placement: .primaryAction) {
172+
163173
HeaderToolbarButtons(
164174
viewModel: viewModel,
165175
showServices: $showServices,

0 commit comments

Comments
 (0)