File tree Expand file tree Collapse file tree 4 files changed +6
-24
lines changed
src/MacVim/PSMTabBarControl/source Expand file tree Collapse file tree 4 files changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -393,12 +393,7 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
393393 if ([cell closeButtonPressed ]) closeButton = metalCloseButtonDown;
394394
395395 closeButtonSize = [closeButton size ];
396- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
397396 [closeButton drawInRect: closeButtonRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil ];
398- #else
399- [closeButton setFlipped: YES ];
400- [closeButton drawAtPoint: closeButtonRect.origin fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 ];
401- #endif
402397
403398 // scoot label over
404399 labelPosition += closeButtonSize.width + kPSMTabBarCellPadding ;
Original file line number Diff line number Diff line change @@ -43,12 +43,7 @@ - (void)drawRect:(NSRect)rect
4343 NSSize imageSize = [image size ];
4444 rect.origin .x = NSMidX (rect) - (imageSize.width * 0.5 );
4545 rect.origin .y = NSMidY (rect) - (imageSize.height * 0.5 );
46- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
4746 [image drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil ];
48- #else
49- [image setFlipped: YES ];
50- [image drawAtPoint: rect.origin fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 ];
51- #endif
5247}
5348
5449- (void )mouseDown : (NSEvent *)event
Original file line number Diff line number Diff line change @@ -389,13 +389,8 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
389389 if ([cell closeButtonPressed ]) closeButton = unifiedCloseButtonDown;
390390
391391 closeButtonSize = [closeButton size ];
392- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
393392 [closeButton drawInRect: closeButtonRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil ];
394- #else
395- [closeButton setFlipped: YES ];
396- [closeButton drawAtPoint: closeButtonRect.origin fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 ];
397- #endif
398-
393+
399394 // scoot label over
400395 labelPosition += closeButtonSize.width + kPSMTabBarCellPadding ;
401396 }
Original file line number Diff line number Diff line change @@ -379,16 +379,13 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
379379 if ([cell hasCloseButton ] && ![cell isCloseButtonSuppressed ]) {
380380 NSSize closeButtonSize = NSZeroSize ;
381381 NSRect closeButtonRect = [cell closeButtonRectForFrame: cellFrame];
382- NSImage * closeButton = nil ;
382+ NSImage *button = nil ;
383383
384- closeButton = nil ;
385- if ([cell closeButtonOver ]) closeButton = closeButtonOver;
386- if ([cell closeButtonPressed ]) closeButton = closeButtonDown;
387-
388- closeButtonSize = [closeButton size ];
389- [closeButton setFlipped: YES ];
390- [closeButton drawAtPoint: closeButtonRect.origin fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 ];
384+ if ([cell closeButtonOver ]) button = closeButtonOver;
385+ if ([cell closeButtonPressed ]) button = closeButtonDown;
391386
387+ closeButtonSize = [button size ];
388+ [button drawInRect: closeButtonRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil ];
392389 }
393390
394391 // object counter
You can’t perform that action at this time.
0 commit comments