aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-02-15 03:15:28 +0100
committerMax <post@wickenrode.com>2015-02-15 03:15:28 +0100
commit3d18994b788dc9563bba804e2eec56cd035bae09 (patch)
tree49ddd44dc8245f17e8485d1ead70c6ced872c504
parent3fce6977d519fa80a96fcfa7baa476a3675a70da (diff)
downloadsequelpro-3d18994b788dc9563bba804e2eec56cd035bae09.tar.gz
sequelpro-3d18994b788dc9563bba804e2eec56cd035bae09.tar.bz2
sequelpro-3d18994b788dc9563bba804e2eec56cd035bae09.zip
Fix compiler compatibility issue with older Xcode versions
-rw-r--r--Source/SPFavoriteTextFieldCell.h1
-rw-r--r--Source/SPFavoriteTextFieldCell.m10
2 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPFavoriteTextFieldCell.h b/Source/SPFavoriteTextFieldCell.h
index 931d767d..0e900636 100644
--- a/Source/SPFavoriteTextFieldCell.h
+++ b/Source/SPFavoriteTextFieldCell.h
@@ -33,6 +33,7 @@
@interface SPFavoriteTextFieldCell : ImageAndTextCell
{
BOOL drawsDividerUnderCell;
+ NSColor *labelColor;
}
- (BOOL)drawsDividerUnderCell;
diff --git a/Source/SPFavoriteTextFieldCell.m b/Source/SPFavoriteTextFieldCell.m
index c5ec9150..00c05da1 100644
--- a/Source/SPFavoriteTextFieldCell.m
+++ b/Source/SPFavoriteTextFieldCell.m
@@ -78,22 +78,22 @@ extern BOOL isOSAtLeast10_10_0(void);
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
- if([self labelColor]) {
+ if(labelColor) {
CGFloat round = (cellFrame.size.height/2);
NSBezierPath *bg = [NSBezierPath bezierPathWithRoundedRect:cellFrame xRadius:round yRadius:round];
if(isOSAtLeast10_10_0()) {
CGFloat h,s,b,a;
- [[self labelColor] getHue:&h saturation:&s brightness:&b alpha:&a];
+ [labelColor getHue:&h saturation:&s brightness:&b alpha:&a];
[[NSColor colorWithCalibratedHue:h saturation:s*1.21 brightness:b*1.1 alpha:a] set];
[bg fill];
}
else {
NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations:
- [[self labelColor] highlightWithLevel:0.33], 0.0,
- [self labelColor], 0.5,
- [[self labelColor] shadowWithLevel:0.15], 1.0, nil];
+ [labelColor highlightWithLevel:0.33], 0.0,
+ labelColor, 0.5,
+ [labelColor shadowWithLevel:0.15], 1.0, nil];
[gradient drawInBezierPath:bg angle:90.0];
[gradient release];
}