mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 21:29:18 +00:00
make the filter bar color match leopard's
This commit is contained in:
@@ -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]]];
|
||||
|
||||
@@ -23,10 +23,12 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "ImageBackgroundView.h"
|
||||
|
||||
@interface FilterBarView : ImageBackgroundView
|
||||
@class CTGradient;
|
||||
|
||||
@interface FilterBarView : NSView
|
||||
{
|
||||
CTGradient * fGradient;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user