martinlexow / SwiftUIWindowStyles

Showcase of window and toolbar style combinations possible with SwiftUI on macOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI .windowStyle() .windowToolbarStyle()

Showcase of window and toolbar styles on macOS using SwiftUI.

→ HOW TO: Add the .windowStyle() and/or .windowToolbarStyle() modifiers to WindowGroup within you App struct:

WindowGroup { /* ... */ }
  .windowStyle(.automatic)
  .windowToolbarStyle(.automatic)

🧑‍💻 Have a look at the SwiftUI source file in order to see how to create the toolbar etc.

🦖 If you are an AppKit developer you might find this helpful as well: NSWindowStyles.

Feel free to make a pull request if you have a style to add.

.windowStyle(.automatic)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

.windowStyle(.hiddenTitleBar)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

.windowStyle(.titleBar)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

About

I’m Martin, an indie dev from Berlin. Enjoying my work? Have a look at some great apps of mine on the Mac App Store 🌀

About

Showcase of window and toolbar style combinations possible with SwiftUI on macOS.

License:MIT License


Languages

Language:Swift 100.0%