diff --git a/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m b/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m index bb760f653c..f74d6b925a 100644 --- a/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m +++ b/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m @@ -393,12 +393,7 @@ void MyNSDrawWindowBackground(NSRect rect) if ([cell closeButtonPressed]) closeButton = metalCloseButtonDown; closeButtonSize = [closeButton size]; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 [closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil]; -#else - [closeButton setFlipped:YES]; - [closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; -#endif // scoot label over labelPosition += closeButtonSize.width + kPSMTabBarCellPadding; diff --git a/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m b/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m index 21727eafa3..2fd6960d70 100644 --- a/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m +++ b/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m @@ -43,12 +43,7 @@ NSSize imageSize = [image size]; rect.origin.x = NSMidX(rect) - (imageSize.width * 0.5); rect.origin.y = NSMidY(rect) - (imageSize.height * 0.5); -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 [image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil]; -#else - [image setFlipped:YES]; - [image drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; -#endif } - (void)mouseDown:(NSEvent *)event diff --git a/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m b/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m index 19f82f2d00..bc6e38e549 100644 --- a/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m +++ b/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m @@ -389,13 +389,8 @@ if ([cell closeButtonPressed]) closeButton = unifiedCloseButtonDown; closeButtonSize = [closeButton size]; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 [closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil]; -#else - [closeButton setFlipped:YES]; - [closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; -#endif - + // scoot label over labelPosition += closeButtonSize.width + kPSMTabBarCellPadding; } diff --git a/src/MacVim/PSMTabBarControl/source/PSMYosemiteTabStyle.m b/src/MacVim/PSMTabBarControl/source/PSMYosemiteTabStyle.m index 370425cad8..054c4158aa 100644 --- a/src/MacVim/PSMTabBarControl/source/PSMYosemiteTabStyle.m +++ b/src/MacVim/PSMTabBarControl/source/PSMYosemiteTabStyle.m @@ -379,16 +379,13 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color) if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) { NSSize closeButtonSize = NSZeroSize; NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame]; - NSImage * closeButton = nil; + NSImage *button = nil; - closeButton = nil; - if ([cell closeButtonOver]) closeButton = closeButtonOver; - if ([cell closeButtonPressed]) closeButton = closeButtonDown; - - closeButtonSize = [closeButton size]; - [closeButton setFlipped:YES]; - [closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; + if ([cell closeButtonOver]) button = closeButtonOver; + if ([cell closeButtonPressed]) button = closeButtonDown; + closeButtonSize = [button size]; + [button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil]; } // object counter