cocoa-cb: fix title bar button state on start up

on start up it was possible to click the hidden buttons. hide the
buttons ons tart up to make the state consistent with the visible state.
This commit is contained in:
der richter 2019-04-21 12:29:42 +02:00
parent c1cdecd147
commit 422b486200
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ class TitleBar: NSVisualEffectView {
frame.size.width, TitleBar.height)
cocoaCB = ccb
super.init(frame: f)
buttons.forEach { $0.isHidden = true }
isHidden = true
alphaValue = 0
blendingMode = .withinWindow
autoresizingMask = [.width, .minYMargin]