Skip to content

Remove the duplicate window controls #2

Description

@qaid

Problem

The floating detail panel has two close controls:

  1. Native macOS close button (red traffic-light): Added by .closable in the NSPanel style mask (Sources/Spook/App/AppDelegate.swift, DetailPanel.init(), line ~164).
  2. Custom SwiftUI close button (xmark.circle.fill): Rendered in the DetailPanelContentView header (line ~225).

Both buttons close the panel. The native close button appears in the transparent titlebar area above the custom SwiftUI header, creating a confusing and visually cluttered experience that is inconsistent with the panel's custom HUD-style design.

Fix

Remove .closable from the NSPanel style mask:

// Before (AppDelegate.swift ~line 164):
styleMask: [.titled, .closable, .fullSizeContentView, .nonactivatingPanel],

// After:
styleMask: [.titled, .fullSizeContentView, .nonactivatingPanel],

The custom xmark.circle.fill button in DetailPanelContentView is the intended close control and must remain unchanged.

Acceptance Criteria

  • The native red traffic-light close button no longer appears on the floating panel.
  • The custom SwiftUI close button (xmark.circle.fill) in the panel header still closes the panel correctly.
  • The pin button still toggles correctly.
  • The panel remains draggable by its background area (isMovableByWindowBackground = true).
  • No other window behaviour changes (floating level, spaces behaviour, shadow, transparency).

Relevant File

  • Sources/Spook/App/AppDelegate.swift, DetailPanel.init() — the styleMask parameter on line ~164.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions