make the filter bar color match leopard's

This commit is contained in:
Mitchell Livingston
2007-11-06 23:55:51 +00:00
parent 229102a196
commit cc5abfe6f4
3 changed files with 20 additions and 6 deletions

View File

@@ -1855,7 +1855,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
if (!filtering)
[tempTorrents setArray: fTorrents];
//set buttons with counts
//set button tooltips
#warning make better
[fNoFilterButton setToolTip: [fTorrents count] == 1 ? NSLocalizedString(@"1 Transfer", "Filter Button -> tool tip")
: [NSString stringWithFormat: NSLocalizedString(@"%d Transfers", "Filter Bar Button -> tool tip"), [fTorrents count]]];

View File

@@ -23,10 +23,12 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "ImageBackgroundView.h"
@interface FilterBarView : ImageBackgroundView
@class CTGradient;
@interface FilterBarView : NSView
{
CTGradient * fGradient;
}
@end

View File

@@ -22,15 +22,27 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#warning needed?
#import "FilterBarView.h"
#import "CTGradient.h"
@implementation FilterBarView
- (void) awakeFromNib
{
[self setBackgroundImage: [NSImage imageNamed: @"FilterBarBackground.png"]];
NSColor * beginningColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0];
NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0];
fGradient = [[CTGradient gradientWithBeginningColor: beginningColor endingColor: endingColor] retain];
}
- (BOOL) isOpaque
{
return YES;
}
- (void) drawRect: (NSRect) rect
{
NSRect bounds = [self bounds];
[fGradient fillRect: rect angle: 90];
}
@end