indragiek / INAppStoreWindow

NSWindow subclass with a highly customizable title bar and traffic lights
BSD 2-Clause "Simplified" License
1.06k stars 162 forks source link

bad window button positioning on Yosemite #194

Open mackuba opened 9 years ago

mackuba commented 9 years ago

I've run my app (built on Xcode 6.1) on Yosemite, and I've noticed that the three buttons in the top-left are positioned incorrectly - they sit in the top-left part of the title bar like in standard apps, and they jump to center-left of the bar when the window is moved. Is this a known issue (or something you've fixed on master)?

mackuba commented 9 years ago

screen shot 2014-11-06 at 15 04 58 screen shot 2014-11-06 at 15 05 07

ThanosSiopoudis commented 9 years ago

I also get this issue, and the same behaviour is observed when buttons are in traffic light mode, i.e. they don't change to traffic lights until the window is moved.

ThanosSiopoudis commented 9 years ago

Quick (and dirty) workaround until a fix becomes available:

__unsafe_unretained typeof (self) weakSelf = self;
self.window.titleBarDrawingBlock = ^(BOOL drawsAsMainWindow, CGRect drawingRect, CGRectEdge rectEdge, CGPathRef clippingPath) {
    [[NSNotificationCenter defaultCenter] postNotificationName:NSWindowDidMoveNotification object:weakSelf.window];
}
berkcebi commented 9 years ago

Same issue here. 👍

One other thing to note: It fixes itself when you move (or resign/make key) the window, yet the buttons' tracking area stays in the wrong location.