mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Suppress warnings and remove unneeded #if-endif
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user