aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/Styles
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-01-27 20:38:23 +0000
committerstuconnolly <stuart02@gmail.com>2011-01-27 20:38:23 +0000
commit8db2f78294982e89fce5a162d92b2be6d9291aa1 (patch)
treeb8dc7736f4af896aa3ed3fa9a96d1f3c4bfd0e59 /Frameworks/PSMTabBar/Styles
parentfa7cff57548edc51420693e6909fe2adb3c18951 (diff)
parent7cc062247ff23496dd0390cf07b5d45d6bc49777 (diff)
downloadsequelpro-8db2f78294982e89fce5a162d92b2be6d9291aa1.tar.gz
sequelpro-8db2f78294982e89fce5a162d92b2be6d9291aa1.tar.bz2
sequelpro-8db2f78294982e89fce5a162d92b2be6d9291aa1.zip
Bring outline view branch up to date with trunk (r3056:r3162).
Diffstat (limited to 'Frameworks/PSMTabBar/Styles')
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m5
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m7
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m4
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m5
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m16
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m7
6 files changed, 26 insertions, 18 deletions
diff --git a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
index be5cf82d..3bda9cf5 100644
--- a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
@@ -399,7 +399,7 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range];
@@ -995,11 +995,12 @@
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
index f2618fe5..901f3b4a 100644
--- a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m
@@ -312,12 +312,12 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
[TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range];
-
+
return attrStr;
}
@@ -414,10 +414,11 @@
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
index 31da000c..56c3a173 100644
--- a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m
@@ -298,11 +298,11 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range];
-
+
return attrStr;
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m
index 443179ce..db9bbd86 100644
--- a/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m
@@ -327,7 +327,7 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
[TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
}
@@ -592,10 +592,11 @@
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
index 9ec84db8..48db93c3 100644
--- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
@@ -337,7 +337,7 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
[TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
}
@@ -375,10 +375,11 @@
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}
@@ -409,7 +410,7 @@
// When the window is in the background, tone down the colours
if (![[tabBar window] isMainWindow] || ![NSApp isActive]) {
- backgroundCalibratedWhite = 0.685;
+ backgroundCalibratedWhite = 0.73;
lineCalibratedWhite = 0.49;
shadowAlpha = 0.3;
}
@@ -514,7 +515,7 @@
fillColor = [NSColor colorWithCalibratedWhite:0.81 alpha:1.0];
shadowColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.4];
} else {
- fillColor = [NSColor colorWithCalibratedWhite:0.685 alpha:1.0];
+ fillColor = [NSColor colorWithCalibratedWhite:0.73 alpha:1.0];
shadowColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.7];
}
}
@@ -533,7 +534,7 @@
topLeftArcCenter = NSMakePoint(aRect.origin.x - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
topRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
bottomLeftArcCenter = NSMakePoint(aRect.origin.x + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius);
- bottomRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius );
+ bottomRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius);
// Construct the outline path
if (drawLeftEdge) {
@@ -594,6 +595,7 @@
[shadow setShadowOffset:NSMakeSize(0, 1)];
[shadow set];
[outlineBezier stroke];
+ [shadow release];
// Add the shadow over the tops of background tabs
} else if (drawLeftEdge || drawRightEdge) {
@@ -632,12 +634,14 @@
// Draw, and then restore the previous graphics state
[outlineBezier stroke];
+ [shadow release];
CGContextRestoreGState(context);
}
[NSGraphicsContext restoreGraphicsState];
- [self drawInteriorWithTabCell:cell inView:[cell controlView]];
+ [self drawInteriorWithTabCell:cell inView:[cell controlView]];
+
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m
index 13fb0994..76b5efc1 100644
--- a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m
@@ -297,11 +297,11 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range];
-
+
return attrStr;
}
@@ -540,10 +540,11 @@
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}