mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
26 lines
No EOL
571 B
Objective-C
26 lines
No EOL
571 B
Objective-C
|
|
#import "SpeedLimitToTurtleIconTransformer.h"
|
|
|
|
@implementation SpeedLimitToTurtleIconTransformer
|
|
|
|
+ (Class) transformedValueClass
|
|
{
|
|
return [NSImage class];
|
|
}
|
|
|
|
+ (BOOL) allowsReverseTransformation
|
|
{
|
|
return NO;
|
|
}
|
|
|
|
- (id) transformedValue: (id) value
|
|
{
|
|
if (!value)
|
|
return nil;
|
|
|
|
return [value boolValue] ? ([NSColor currentControlTint] == NSBlueControlTint
|
|
? [NSImage imageNamed: @"SpeedLimitButtonBlue.png"] : [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"])
|
|
: [NSImage imageNamed: @"SpeedLimitButton.png"];
|
|
}
|
|
|
|
@end |