update inspector tab images

This commit is contained in:
Mitchell Livingston 2008-01-16 04:37:27 +00:00
parent 3c37878b21
commit e641e54b2e
7 changed files with 3019 additions and 3051 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 547 B

View File

@ -26,6 +26,7 @@
@implementation InfoTabButtonCell
#warning store images in image/alternateImage?
- (void) awakeFromNib
{
[(NSMatrix *)[self controlView] setToolTip: [self title] forCell: self];
@ -51,7 +52,7 @@
- (void) setIcon: (NSImage *) image
{
[fIcon release];
fIcon = image ? [image retain] : nil;
fIcon = [image retain];
if (fRegularImage)
{
@ -97,13 +98,12 @@
{
if (fIcon)
{
NSSize iconSize = [fIcon size];
NSRect imageRect = NSMakeRect(0, 0, [tabImage size].width, [tabImage size].height);
NSRect rect = NSMakeRect(imageRect.origin.x + (imageRect.size.width - iconSize.width) * 0.5,
imageRect.origin.y + (imageRect.size.height - iconSize.height) * 0.5, iconSize.width, iconSize.height);
NSSize iconSize = [fIcon size], tabSize = [tabImage size];
NSPoint point = NSMakePoint(floorf((tabSize.width - iconSize.width) * 0.5),
floorf((tabSize.height - iconSize.height) * 0.5));
[tabImage lockFocus];
[fIcon drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
[fIcon compositeToPoint: point operation: NSCompositeSourceOver];
[tabImage unlockFocus];
}
}
@ -113,11 +113,8 @@
- (void) updateControlTint: (NSNotification *) notification
{
if (fSelectedImage)
{
[fSelectedImage release];
fSelectedImage = nil;
}
[fSelectedImage release];
fSelectedImage = nil;
if (fSelected)
[self setSelectedTab: YES];