Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
371 changes: 371 additions & 0 deletions Base.lproj/MainMenu.nib/designable.nib

Large diffs are not rendered by default.

Binary file added Base.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
20 changes: 8 additions & 12 deletions CTBadge.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,28 @@ extern const float CTLargeLabelSize;
extern const float CTSmallLabelSize;

@interface CTBadge : NSObject
{
NSColor *badgeColor;
NSColor *labelColor;
}
{
}

+ (CTBadge *)systemBadge; //Classic white on red badge
+ (CTBadge *)badgeWithColor:(NSColor *)badgeColor labelColor:(NSColor *)labelColor; //Badge of any color scheme
+ (CTBadge *)badgeWithColor:(NSColor *)badgeColor labelColor:(NSColor *)labelColor gradientIntensity:(CGFloat) intensity; //Badge of any color scheme

- (NSImage *)smallBadgeForValue:(unsigned)value; //Image to use during drag operations
- (NSImage *)smallBadgeForString:(NSString *)string;
- (NSImage *)largeBadgeForValue:(unsigned)value; //For dock icons, etc
- (NSImage *)largeBadgeForString:(NSString *)string;
- (NSImage *)badgeOfSize:(float)size forValue:(unsigned)value; //A badge of arbitrary size,
- (NSImage *)badgeOfSize:(float)size forString:(NSString *)string; // <size> is the size in pixels of the badge
// not counting the shadow effect
// (image returned will be larger than <size>)
// not counting the shadow effect
// (image returned will be larger than <size>)

- (NSImage *)badgeOverlayImageForValue:(unsigned)value insetX:(float)dx y:(float)dy; //Returns a transparent 128x128 image
- (NSImage *)badgeOverlayImageForString:(NSString *)string insetX:(float)dx y:(float)dy; // with Large badge inset dx/dy from the upper right
- (void)badgeApplicationDockIconWithValue:(unsigned)value insetX:(float)dx y:(float)dy; //Badges the Application's icon with <value>
- (void)badgeApplicationDockIconWithString:(NSString *)string insetX:(float)dx y:(float)dy; // and puts it on the dock

- (void)setBadgeColor:(NSColor *)theColor; //Sets the color used on badge
- (void)setLabelColor:(NSColor *)theColor; //Sets the color of the label

- (NSColor *)badgeColor; //Color currently being used on the badge
- (NSColor *)labelColor; //Color currently being used on the label
@property (readwrite) NSColor* badgeColor;
@property (readwrite) NSColor* labelColor;
@property (readwrite) CGFloat badgeGradientIntensity;

@end
Loading