bwalkin / BWToolkit (http://brandonwalkin.com/bwtoolkit/)
BWToolkit is an Interface Builder plugin that contains commonly used UI elements and other objects designed to simplify development for the Mac.
| commit 97: | 09a0717f8ece |
| parent 96: | ff910bf218b4 |
| branch: | default |
Cleaned up some code
13 months ago
Changed (Δ198 bytes):
raw changeset »
BWTransparentPopUpButtonCell.m (7 lines added, 16 lines removed)
Up to file-list BWTransparentPopUpButtonCell.m:
| … | … | @@ -75,17 +75,15 @@ static NSColor *disabledColor, *enabledC |
75 |
75 |
if ([image isTemplate]) |
76 |
76 |
newImage = [image bwTintedImageWithColor:[self interiorColor]]; |
77 |
77 |
|
78 |
NSAffineTransform* xform = [NSAffineTransform transform]; |
|
79 |
[xform translateXBy:0.0 yBy:cellFrame.size.height]; |
|
80 |
[xform scaleXBy:1.0 yBy:-1.0]; |
|
81 |
[xform concat]; |
|
78 |
NSAffineTransform* transform = [NSAffineTransform transform]; |
|
79 |
[transform translateXBy:0.0 yBy:cellFrame.size.height]; |
|
80 |
[transform scaleXBy:1.0 yBy:-1.0]; |
|
81 |
[transform concat]; |
|
82 |
82 |
|
83 |
83 |
[newImage drawInRect:[self imageRectForBounds:cellFrame] fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; |
84 |
84 |
|
85 |
NSAffineTransform* xform2 = [NSAffineTransform transform]; |
|
86 |
[xform2 translateXBy:0.0 yBy:cellFrame.size.height]; |
|
87 |
[xform2 scaleXBy:1.0 yBy:-1.0]; |
|
88 |
[xform2 concat]; |
|
85 |
[transform invert]; |
|
86 |
[transform concat]; |
|
89 |
87 |
} |
90 |
88 |
} |
91 |
89 |
|
| … | … | @@ -151,14 +149,7 @@ static NSColor *disabledColor, *enabledC |
151 |
149 |
|
152 |
150 |
- (NSColor *)interiorColor |
153 |
151 |
{ |
154 |
NSColor *interiorColor; |
|
155 |
||
156 |
if ([self isEnabled]) |
|
157 |
interiorColor = enabledColor; |
|
158 |
else |
|
159 |
interiorColor = disabledColor; |
|
160 |
||
161 |
return interiorColor; |
|
152 |
return [self isEnabled] ? enabledColor : disabledColor; |
|
162 |
153 |
} |
163 |
154 |
|
164 |
155 |
- (NSControlSize)controlSize |
