• Stars
    star
    252
  • Rank 160,894 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 4 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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 🌀