Note : setting it to BORDERLESS, removes the traffic light, and there is “no border”… which is also required otherwise the window gets “lost” on the screen
yes it might… but not a MBS method… a valid DECLARE perhaps
But so far my research hasn’t shown any evidence that it is possible…
my current solution is to set it to “resizeable” which removes the title (and traffic light) but retains the visual border. I then put a fake NSButton in place of the Red ball
otherwise any previous attributes remain, and if .Titled is set (which it usually is) all the traffic lights appear… You can set the title to and self.titlebarAppearsTransparent = true, but you seem to lose control of the traffic lights
Note : adding or deleting the flags for the traffic lights has no effect if both FullSizeContent and Titled are on (I’ve tried all the combinations)
if you remove .Titles you lose the traffic light completely… so I still need my “fake” button
Turns out this is NOT the whole solution
While using this flag allowed me to make the window look like I wanted, that particular mask disabled any controls on the window.
if .TITLED isn’t in the mask nothing seems to work… which begs the question… WHY?
make the mask [.titled,.fullsizecontentview]
self.title=""
self.titlebarAppearsTransparent = true
//
self.closeButton = false
self.maximizeButton = false
self.minimizeButton = false
But yeah… the mask MUST contain .TITLE (I tried every possible combo, and if TITLE wasn’t there… nothing worked (well Textfields)…
So I added the Mask, then made the titlearea transparent, removed any caption, and disabled the individual traffic lights. I wanted just the red one, but if I leave that “on”, and the others off, I get RED and 2 gray… so I left my fake one.
If anyone comes up with a scenario the provides the desired results and is more “proper”… I’m open to it
This is what I do in a window, where I only want the close box to appear and without showing the title-bar (although I still want the window title visible).
If you found the example project coming with the plugin, you may notice that it just gets the parent view of the content view to add a control there.
You can do that in Swift. Just NSView