Changeset 1312
- Timestamp:
- Jan 2, 2007, 7:51:02 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Transmission.xcodeproj/project.pbxproj
r1307 r1312 112 112 A24600520A6DCE6600D19088 /* SpeedLimitButtonGraphite.png in Resources */ = {isa = PBXBuildFile; fileRef = A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */; }; 113 113 A24999230B49F1B5001EADA3 /* ActionPopUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A24999210B49F1B5001EADA3 /* ActionPopUpButton.m */; }; 114 A24999440B49F5AD001EADA3 /* ActionPopUpButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A24999420B49F5AD001EADA3 /* ActionPopUpButtonCell.m */; };115 114 A24F19080A3A790800C9C145 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; }; 116 115 A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; }; … … 314 313 A24999200B49F1B5001EADA3 /* ActionPopUpButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionPopUpButton.h; path = macosx/ActionPopUpButton.h; sourceTree = "<group>"; }; 315 314 A24999210B49F1B5001EADA3 /* ActionPopUpButton.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionPopUpButton.m; path = macosx/ActionPopUpButton.m; sourceTree = "<group>"; }; 316 A24999420B49F5AD001EADA3 /* ActionPopUpButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionPopUpButtonCell.m; path = macosx/ActionPopUpButtonCell.m; sourceTree = "<group>"; };317 A24999430B49F5AD001EADA3 /* ActionPopUpButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionPopUpButtonCell.h; path = macosx/ActionPopUpButtonCell.h; sourceTree = "<group>"; };318 315 A24F19070A3A790800C9C145 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = macosx/Sparkle.framework; sourceTree = "<group>"; }; 319 316 A253F6F20A698970008EE24F /* FilterBarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FilterBarBackground.png; path = macosx/Images/FilterBarBackground.png; sourceTree = "<group>"; }; … … 468 465 A24999200B49F1B5001EADA3 /* ActionPopUpButton.h */, 469 466 A24999210B49F1B5001EADA3 /* ActionPopUpButton.m */, 470 A24999420B49F5AD001EADA3 /* ActionPopUpButtonCell.m */,471 A24999430B49F5AD001EADA3 /* ActionPopUpButtonCell.h */,472 467 ); 473 468 name = Sources; … … 935 930 A2BF07910B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m in Sources */, 936 931 A24999230B49F1B5001EADA3 /* ActionPopUpButton.m in Sources */, 937 A24999440B49F5AD001EADA3 /* ActionPopUpButtonCell.m in Sources */,938 932 ); 939 933 runOnlyForDeploymentPostprocessing = 0; -
trunk/macosx/ActionPopUpButton.h
r1307 r1312 5 5 @interface ActionPopUpButton : NSPopUpButton 6 6 { 7 NSImage * fImage, * fImagePressed; 7 8 } 8 9 @end -
trunk/macosx/ActionPopUpButton.m
r1311 r1312 1 1 #import "ActionPopUpButton.h" 2 #import "ActionPopUpButtonCell.h"3 2 4 3 @implementation ActionPopUpButton … … 6 5 - (id) initWithCoder: (NSCoder *) coder 7 6 { 8 if ( self = [super initWithCoder: coder])7 if ((self = [super initWithCoder: coder])) 9 8 { 10 [self setCell: [[ActionPopUpButtonCell alloc] initTextCell: @"" pullsDown: YES]]; 9 fImage = [NSImage imageNamed: @"ActionButton.png"]; 10 [fImage setFlipped: YES]; 11 fImagePressed = [NSImage imageNamed: @"ActionButtonPressed.png"]; 12 [fImagePressed setFlipped: YES]; 11 13 } 12 14 return self; 13 15 } 14 16 17 - (void) drawRect: (NSRect) rect 18 { 19 NSImage * image = [[self cell] isHighlighted] ? fImagePressed : fImage; 20 [image drawInRect: rect fromRect: NSMakeRect(0.0, 0.0, [image size].width, [image size].height) 21 operation: NSCompositeSourceOver fraction: 1.0]; 22 } 23 15 24 @end
Note: See TracChangeset
for help on using the changeset viewer.