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