Anonymous avatar Anonymous committed 09a0717

Cleaned up some code

Comments (0)

Files changed (1)

BWTransparentPopUpButtonCell.m

 		if ([image isTemplate])
 			newImage = [image bwTintedImageWithColor:[self interiorColor]];
 
-		NSAffineTransform* xform = [NSAffineTransform transform];
-		[xform translateXBy:0.0 yBy:cellFrame.size.height];
-		[xform scaleXBy:1.0 yBy:-1.0];
-		[xform concat];
+		NSAffineTransform* transform = [NSAffineTransform transform];
+		[transform translateXBy:0.0 yBy:cellFrame.size.height];
+		[transform scaleXBy:1.0 yBy:-1.0];
+		[transform concat];
 		
 		[newImage drawInRect:[self imageRectForBounds:cellFrame] fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1];
 		
-		NSAffineTransform* xform2 = [NSAffineTransform transform];
-		[xform2 translateXBy:0.0 yBy:cellFrame.size.height];
-		[xform2 scaleXBy:1.0 yBy:-1.0];
-		[xform2 concat];
+		[transform invert];
+		[transform concat];
 	}	
 }
 
 
 - (NSColor *)interiorColor
 {
-	NSColor *interiorColor;
-	
-	if ([self isEnabled])
-		interiorColor = enabledColor;
-	else
-		interiorColor = disabledColor;
-	
-	return interiorColor;
+	return [self isEnabled] ? enabledColor : disabledColor;
 }
 
 - (NSControlSize)controlSize
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.