Comments (3)
Why would you use this there? You can just use Settings
. No need for this package.
from settings.
@sindresorhus because SwiftUI doesn't provide a native way to present the Preferences window / add the menu item without doing what @macaaw demonstrates above. The example you provide in your README is out of date and doesn't work out of the box with SwiftUI.
from settings.
In swiftui you can use .commands modifier just below Window Group
CommandGroup(replacing: .appSettings){ Button("Preferences..."){ SettingsWindowController(panes: [SettingsViewController.GeneralPreferenceViewController()], style: .toolbarItems, animated: true, hidesToolbarForSingleItem: true) .show() } .keyboardShortcut(KeyEquivalent(","), modifiers: .command) }
from settings.
Related Issues (20)
- NSApp.activate(ignoringOtherApps: true) is deprecated. HOT 3
- Can the height of the toolbar be customized HOT 1
- How to horizontally align section within a container?
- SF Symbols look stretched on external displays HOT 1
- Can't add Slider to Section
- How to set preferredColorScheme? HOT 1
- Name Space Issue of Settings.PaneIdentifier
- [Feature Request] Prefer to use LocalizedStringKey in Settings's SwiftUI interface HOT 2
- AppStorage + Toggle in Settings will cause a UI render issue HOT 2
- Crashes on `viewDidLoad` due to `nil` outlets HOT 2
- Custom Picture HOT 2
- Notify when a tab has changed HOT 2
- [Feature Suggestion] Consider supporting new preferences window layout since macOS 13? HOT 4
- Support for Touch Bar? HOT 2
- Animate Window Size based on content change HOT 2
- how to align sections in a container? HOT 2
- Resizing animations are broken for demo project on Monetery HOT 3
- `animated: false` is not taking effect in Settings 3.0
- Persist state via AppStorage
- Many log warnings when changing scale of TextFields inside SwiftUI views HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from settings.