Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Sources/CodexBar/PreferencesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ final class SettingsWindowAppearanceView: NSView {
if !window.styleMask.contains(.resizable) {
window.styleMask.insert(.resizable)
}
if !window.styleMask.contains(.miniaturizable) {
window.styleMask.insert(.miniaturizable)
}
if !window.titlebarAppearsTransparent {
window.titlebarAppearsTransparent = true
}
Expand Down
16 changes: 16 additions & 0 deletions Tests/CodexBarTests/SettingsWindowAppearanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,22 @@ struct SettingsWindowAppearanceTests {
#expect(window.styleMask.contains(.resizable))
}

@Test
func `settings window style enables minimization`() {
let bridge = SettingsWindowAppearanceView()
let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 400, height: 300),
styleMask: [.titled],
backing: .buffered,
defer: false)

window.contentView = bridge

#expect(window.styleMask.contains(.miniaturizable))
#expect(window.isMiniaturizable)
#expect(window.standardWindowButton(.miniaturizeButton)?.isEnabled == true)
}

@Test
func `settings window extends content behind the titlebar for the edge-to-edge sidebar`() {
let bridge = SettingsWindowAppearanceView()
Expand Down
Binary file added docs/screenshots/settings-minimize-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading