Skip to content

Instantly share code, notes, and snippets.

@MartinJNash
Created March 27, 2015 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinJNash/ced08f85b4db29a1dd47 to your computer and use it in GitHub Desktop.
Save MartinJNash/ced08f85b4db29a1dd47 to your computer and use it in GitHub Desktop.
Hide NSDocument's "move to" titlebar button
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