Created
March 27, 2015 17:59
-
-
Save MartinJNash/ced08f85b4db29a1dd47 to your computer and use it in GitHub Desktop.
Hide NSDocument's "move to" titlebar button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AppKit | |
class NoMoveWindow: NSWindow { | |
override class func standardWindowButton(b: NSWindowButton, forStyleMask m: Int) -> NSButton? { | |
if b == NSWindowButton.DocumentVersionsButton { | |
return nil | |
} | |
return super.standardWindowButton(b, forStyleMask: m) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment