Skip to content

Releases: sindresorhus/Settings

v0.4.0

14 Jun 09:44
Compare
Choose a tag to compare

Fixes

  • Fix automatic localization of "Preferences" in the window title when there's only one preference pane. 18f009c

v0.3.0

14 May 08:42
Compare
Choose a tag to compare

Screen Shot 2019-05-14 at 15 48 49

The main feature of this release is a segmented control style. We have also considerably improved the API and codebase.

Breaking

  • The Preferenceable protocol was renamed to PreferencePane
  • The required toolbarItemTitle property was renamed to preferencePaneTitle
  • You now have to provide a preferencePaneIdentifier property in your view controller
  • Remove .hideWindow() in favor of NSWindowController#close() (#21) d9ad07c
  • The PreferencesWindowController viewControllers parameter was renamed to preferencePanes
  • The .showWindow() method was renamed to .show() and you can now optionally pass in which preference pane to show

Migrating a view controller:

+extension PreferencePane.Identifier {
+	static let general = Identifier("general")
+}

-final class GeneralPreferenceViewController: NSViewController, Preferenceable {
+final class GeneralPreferenceViewController: NSViewController, PreferencePane {
+	let preferencePaneIdentifier = PreferencePane.Identifier.general
-	let toolbarItemTitle = "General"
+	let preferencePaneTitle = "General"
 	let toolbarItemIcon = NSImage(named: NSImage.preferencesGeneralName)!
 	// …

Enhancements

  • Add segmented control style (#6) 3b62df8 (See the readme for example)
  • Use the preference pane title as window title (#19) 891d9df
    To better align with the macOS Human Interface Guidelines.
  • Restore active preference when reopening window (#26) 2bb3fc7
  • Add option to hide the toolbar when there's one or less items (#25) 27f4b3e
  • Upgrade to Swift 5 e0ef252

Known issues

  • It doesn't show the Preferences window if you're not using auto-layout for your view controllers. It's being worked on in #28. Temporary workaround.
  • It doesn't correctly localize the window title when there's only one tab. It's being worked on in #24.

Meta

v0.2.1

02 Jan 01:49
Compare
Choose a tag to compare
  • Fix Gatekeeper validation errors when distributing apps (#7) 998120b