Changeset 5740
- Timestamp:
- May 2, 2008, 1:08:23 PM (14 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/BadgeView.m
r5687 r5740 71 71 { 72 72 fQuitting = YES; 73 [self display];74 73 } 75 74 -
trunk/macosx/InfoTabButtonCell.h
r4423 r5740 27 27 @interface InfoTabButtonCell : NSButtonCell 28 28 { 29 NSImage * fIcon , * fRegularImage, * fSelectedImage;29 NSImage * fIcon; 30 30 31 31 BOOL fSelected; -
trunk/macosx/InfoTabButtonCell.m
r4779 r5740 44 44 [fIcon release]; 45 45 46 [fRegularImage release];47 [fSelectedImage release];48 46 [super dealloc]; 49 47 } … … 53 51 [fIcon release]; 54 52 fIcon = [image retain]; 55 56 if (fRegularImage)57 {58 [fRegularImage release];59 fRegularImage = nil;60 }61 if (fSelectedImage)62 {63 [fSelectedImage release];64 fSelectedImage = nil;65 }66 53 67 54 [self setSelectedTab: fSelected]; … … 73 60 74 61 NSImage * tabImage; 75 BOOL createImage = NO;76 62 if (fSelected) 63 tabImage = [NSColor currentControlTint] == NSGraphiteControlTint 64 ? [[NSImage imageNamed: @"InfoTabBackGraphite.png"] copy] : [[NSImage imageNamed: @"InfoTabBackBlue.png"] copy]; 65 else 66 tabImage = [[NSImage imageNamed: @"InfoTabBack.png"] copy]; 67 68 if (fIcon) 77 69 { 78 if (!fSelectedImage) 79 { 80 fSelectedImage = [NSColor currentControlTint] == NSGraphiteControlTint 81 ? [[NSImage imageNamed: @"InfoTabBackGraphite.png"] copy] : [[NSImage imageNamed: @"InfoTabBackBlue.png"] copy]; 82 createImage = YES; 83 } 84 tabImage = fSelectedImage; 85 } 86 else 87 { 88 if (!fRegularImage) 89 { 90 fRegularImage = [[NSImage imageNamed: @"InfoTabBack.png"] copy]; 91 createImage = YES; 92 } 93 tabImage = fRegularImage; 94 } 95 96 if (createImage) 97 { 98 if (fIcon) 99 { 100 NSSize iconSize = [fIcon size], tabSize = [tabImage size]; 101 NSPoint point = NSMakePoint(floorf((tabSize.width - iconSize.width) * 0.5), 102 floorf((tabSize.height - iconSize.height) * 0.5)); 103 104 [tabImage lockFocus]; 105 [fIcon compositeToPoint: point operation: NSCompositeSourceOver]; 106 [tabImage unlockFocus]; 107 } 70 NSSize iconSize = [fIcon size], tabSize = [tabImage size]; 71 NSPoint point = NSMakePoint(floorf((tabSize.width - iconSize.width) * 0.5), 72 floorf((tabSize.height - iconSize.height) * 0.5)); 73 74 [tabImage lockFocus]; 75 [fIcon compositeToPoint: point operation: NSCompositeSourceOver]; 76 [tabImage unlockFocus]; 108 77 } 109 78 110 79 [self setImage: tabImage]; 80 [tabImage release]; 111 81 } 112 82 113 83 - (void) updateControlTint: (NSNotification *) notification 114 84 { 115 [fSelectedImage release];116 fSelectedImage = nil;117 118 85 if (fSelected) 119 86 [self setSelectedTab: YES];
Note: See TracChangeset
for help on using the changeset viewer.