Highlighting of filter buttons should hopefully be even more "less buggy."

This commit is contained in:
Mitchell Livingston 2006-07-16 04:50:32 +00:00
parent db1b376d61
commit 41e4c33e2b
2 changed files with 9 additions and 6 deletions

View File

@ -32,6 +32,7 @@
if ((self = [super initWithCoder: coder])) if ((self = [super initWithCoder: coder]))
{ {
fEnabled = NO; fEnabled = NO;
fTrackingTag = 0;
NSSize buttonSize = [self frame].size; NSSize buttonSize = [self frame].size;
fButtonNormal = [[NSImage alloc] initWithSize: buttonSize]; fButtonNormal = [[NSImage alloc] initWithSize: buttonSize];
@ -104,11 +105,6 @@
return self; return self;
} }
- (void) awakeFromNib
{
fTrackingTag = [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO];
}
- (void) dealloc - (void) dealloc
{ {
[fButtonNormal release]; [fButtonNormal release];
@ -206,7 +202,8 @@
- (void) resetBounds: (NSNotification *) notification - (void) resetBounds: (NSNotification *) notification
{ {
[self removeTrackingRect: fTrackingTag]; if (fTrackingTag)
[self removeTrackingRect: fTrackingTag];
fTrackingTag = [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO]; fTrackingTag = [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO];
} }

View File

@ -1571,6 +1571,12 @@ static void sleepCallBack(void * controller, io_service_t y,
NSSize minSize = [fWindow contentMinSize]; NSSize minSize = [fWindow contentMinSize];
minSize.height += heightChange; minSize.height += heightChange;
[fWindow setContentMinSize: minSize]; [fWindow setContentMinSize: minSize];
//reset tracking rects for filter buttons
[fNoFilterButton resetBounds: nil];
[fSeedFilterButton resetBounds: nil];
[fDownloadFilterButton resetBounds: nil];
[fPauseFilterButton resetBounds: nil];
} }
- (void) toggleAdvancedBar: (id) sender - (void) toggleAdvancedBar: (id) sender