Make main window title-less again — but allow for a hidden pref to change that: KafasisTitleMode.

This commit is contained in:
Brent Simmons 2017-12-02 14:54:12 -08:00
parent 432ac00477
commit ef988199cc
2 changed files with 11 additions and 1 deletions

View File

@ -26,6 +26,9 @@ final class AppDefaults {
static let timelineFontSize = "timelineFontSize"
static let detailFontSize = "detailFontSize"
static let openInBrowserInBackground = "openInBrowserInBackground"
// Hidden prefs
static let showTitleOnMainWindow = "KafasisTitleMode"
}
private let smallestFontSizeRawValue = FontSize.small.rawValue
@ -69,6 +72,10 @@ final class AppDefaults {
}
}
var showTitleOnMainWindow: Bool {
return bool(for: Key.showTitleOnMainWindow)
}
private init() {
AppDefaults.registerDefaults()

View File

@ -29,7 +29,10 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
super.windowDidLoad()
// window?.titleVisibility = .hidden
if !AppDefaults.shared.showTitleOnMainWindow {
window?.titleVisibility = .hidden
}
window?.setFrameUsingName(windowAutosaveName, force: true)
detailSplitViewItem?.minimumThickness = 384