Skip to content

Commit

Permalink
Fix Auto Layout satisfiability (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriszielinski authored and sindresorhus committed Oct 10, 2018
1 parent 7303967 commit ecbd51a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Sources/Preferences/PreferencesWindowController.swift
Expand Up @@ -18,18 +18,17 @@ public final class PreferencesWindowController: NSWindowController {
super.init(window: window)

window.title = String(System.localizedString(forKey: "Preferences…").dropLast())

tabViewController.tabStyle = .toolbar
tabViewController.transitionOptions = [.crossfade, .slideDown]
window.contentView = tabViewController.view

for viewController in viewControllers {
tabViewController.tabViewItems = viewControllers.map { viewController in
let item = NSTabViewItem(identifier: viewController.toolbarItemTitle)
item.label = viewController.toolbarItemTitle
item.image = viewController.toolbarItemIcon
item.viewController = viewController as? NSViewController
tabViewController.addTabViewItem(item)
return item
}
tabViewController.tabStyle = .toolbar
tabViewController.transitionOptions = [.crossfade, .slideDown]
}

public required init?(coder: NSCoder) {
Expand Down

0 comments on commit ecbd51a

Please sign in to comment.