ref: cleaner "menu bar icon"
This commit is contained in:
@@ -126,18 +126,18 @@ static void RoundedRSS_Gradient(CGRect r, NSColor *color) {
|
|||||||
static void Appearance_MenuBarIcon(CGRect r) {
|
static void Appearance_MenuBarIcon(CGRect r) {
|
||||||
const CGFloat size = ShorterSide(r.size);
|
const CGFloat size = ShorterSide(r.size);
|
||||||
CGContextRef c = NSGraphicsContext.currentContext.CGContext;
|
CGContextRef c = NSGraphicsContext.currentContext.CGContext;
|
||||||
CGContextSetFillColorWithColor(c, [NSColor controlTextColor].CGColor);
|
|
||||||
|
|
||||||
// menu bar
|
// menu bar
|
||||||
CGContextSetAlpha(c, .23);
|
CGContextSetFillColorWithColor(c, [NSColor controlTextColor].CGColor);
|
||||||
const CGFloat barHeightInset = round(size*.06);
|
svgRect(c, 1, CGRectInset(r, 0, size * 2/16));
|
||||||
svgRect(c, 1, CGRectInset(r, 0, barHeightInset));
|
|
||||||
CGContextFillPath(c);
|
CGContextFillPath(c);
|
||||||
|
|
||||||
|
// neighbors
|
||||||
const CGFloat offset = round(size*.75);
|
const CGFloat offset = round(size*.75);
|
||||||
const CGFloat iconInset = round(size*.2);
|
const CGFloat iconInset = round(size*.2);
|
||||||
const CGFloat iconCorner = size*.12;
|
const CGFloat iconCorner = size*.12;
|
||||||
CGContextSetAlpha(c, .66);
|
CGContextSetAlpha(c, .66);
|
||||||
|
CGContextSetFillColorWithColor(c, [NSColor controlBackgroundColor].CGColor);
|
||||||
|
|
||||||
// left neighbor
|
// left neighbor
|
||||||
CGContextTranslateCTM(c, -offset, 0);
|
CGContextTranslateCTM(c, -offset, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user