aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2014-02-10 01:38:10 +0000
committerrowanbeentje <rowan@beent.je>2014-02-10 01:38:10 +0000
commit5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b (patch)
tree77acc8717172974934b8127a1121bf38fd7159e5 /Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
parent38ca716543d7601a4e29823fb4578b96c599cf81 (diff)
downloadsequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.tar.gz
sequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.tar.bz2
sequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.zip
Fix run-time warnings due to use of deprecated [NSImage compositeToPoint:...] operations
Diffstat (limited to 'Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m')
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m15
1 files changed, 4 insertions, 11 deletions
diff --git a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
index 901f3b4a..161dbe8d 100644
--- a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
@@ -451,12 +451,8 @@
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;
}
@@ -465,9 +461,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) {
@@ -478,8 +471,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;
}