From 07c2e4c0e06de6a451cd609086b71c7dcef7ab7b Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Mon, 20 Oct 2014 19:47:44 +1100 Subject: [PATCH] Issue 180 - On Yosemite traffic lights in full screen are missing --- INAppStoreWindow/INAppStoreWindow.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/INAppStoreWindow/INAppStoreWindow.m b/INAppStoreWindow/INAppStoreWindow.m index 6d5c3a7..6f5184f 100755 --- a/INAppStoreWindow/INAppStoreWindow.m +++ b/INAppStoreWindow/INAppStoreWindow.m @@ -1130,7 +1130,11 @@ - (void)_layoutTrafficLightsAndContent CGFloat buttonOrigin = 0.0; if (!self.verticalTrafficLightButtons) { if (self.centerTrafficLightButtons) { - buttonOrigin = round(NSMidY(titleBarFrame) - INMidHeight(closeFrame)); + if (INRunningYosemite() && self.styleMask & NSFullScreenWindowMask) { + buttonOrigin = round(self._minimumTitlebarHeight * 0.5 - INMidHeight(closeFrame)); + } else { + buttonOrigin = round(NSMidY(titleBarFrame) - INMidHeight(closeFrame)); + } } else { buttonOrigin = NSMaxY(titleBarFrame) - NSHeight(closeFrame) - self.trafficLightButtonsTopMargin; }