INAppStoreWindow icon indicating copy to clipboard operation
INAppStoreWindow copied to clipboard

Traffic light buttons

Open kalvish21 opened this issue 9 years ago • 2 comments
trafficstars

I use the default traffic light buttons on OSX. For some strange reason when I do beginSheet on my app and show an NSWindow, the traffic light buttons go to the top. Right now the height is 38 on the titleBar.

Is there a way to fix this?

kalvish21 avatar Aug 29 '16 06:08 kalvish21

@kalvish21

a workaround here(Swift):

        let aWindow = self.window as! INAppStoreWindow
        aWindow.titleBarDrawingBlock = {[unowned self] drawsAsMainWindow, drawingRect, edge, clippingPath  in
            NSNotificationCenter.defaultCenter().postNotificationName(NSWindowDidMoveNotification, object:self.window)
        }

fancymax avatar Aug 29 '16 11:08 fancymax

Can I know waht this code does? and which version of swift?

kalvish21 avatar Aug 29 '16 18:08 kalvish21