aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m')
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m16
1 files changed, 5 insertions, 11 deletions
diff --git a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
index 56c3a173..44f5b098 100644
--- a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
@@ -455,12 +455,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;
}
@@ -469,9 +466,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) {
@@ -481,8 +475,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;
}