From 5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 10 Feb 2014 01:38:10 +0000 Subject: Fix run-time warnings due to use of deprecated [NSImage compositeToPoint:...] operations --- Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m') diff --git a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m index 76b5efc1..dcf99545 100644 --- a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m @@ -430,12 +430,9 @@ if ([cell closeButtonPressed]) closeButton = [cell isEdited] ? unifiedCloseDirtyButtonDown : unifiedCloseButtonDown; closeButtonSize = [closeButton size]; - if ([controlView isFlipped]) { - closeButtonRect.origin.y += closeButtonRect.size.height; - } - - [closeButton compositeToPoint:closeButtonRect.origin operation:NSCompositeSourceOver fraction:1.0]; - + + [closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil]; + // scoot label over labelPosition += closeButtonSize.width + kPSMTabBarCellPadding; } @@ -444,9 +441,6 @@ if ([cell hasIcon]) { NSRect iconRect = [self iconRectForTabCell:cell]; NSImage *icon = [[[cell representedObject] identifier] icon]; - if ([controlView isFlipped]) { - iconRect.origin.y += iconRect.size.height; - } // center in available space (in case icon image is smaller than kPSMTabBarIconWidth) if ([icon size].width < kPSMTabBarIconWidth) { @@ -456,8 +450,8 @@ iconRect.origin.y -= (kPSMTabBarIconWidth - [icon size].height) / 2.0; } - [icon compositeToPoint:iconRect.origin operation:NSCompositeSourceOver fraction:1.0]; - + [icon drawInRect:iconRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil]; + // scoot label over labelPosition += iconRect.size.width + kPSMTabBarCellPadding; } -- cgit v1.2.3