Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
amitailanciano committed Sep 4, 2014
2 parents 7ca6422 + d84387e commit a47d3cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
21 changes: 10 additions & 11 deletions Vagrant Manager/AXStatusItemPopup/AXStatusItemPopup.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ - (void)setTitle:(NSString*)title {
NSAttributedString *string = [[NSAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName: _titleView.font}];
CGRect rect = [string boundingRectWithSize:(CGSize){CGFLOAT_MAX, self.frame.size.height} options:NSStringDrawingUsesLineFragmentOrigin];


CGRect frame = _titleView.frame;
frame.size.width = rect.size.width;
frame.size.height = rect.size.height;
Expand All @@ -111,16 +110,6 @@ - (void)drawRect:(NSRect)dirtyRect
[[NSColor clearColor] setFill];
}
NSRectFill(dirtyRect);

// set image
NSImage *image = (_active ? _alternateImage : _image);
_imageView.image = image;

if(_active) {
_titleView.textColor = [NSColor whiteColor];
} else {
_titleView.textColor = [NSColor blackColor];
}
}

////////////////////////////////////
Expand Down Expand Up @@ -152,12 +141,19 @@ - (void)mouseDown:(NSEvent *)theEvent
- (void)setActive:(BOOL)active
{
_active = active;

_imageView.image = (_active ? _alternateImage : _image);
_titleView.textColor = (_active ? [NSColor whiteColor] : [NSColor blackColor]);

[self setNeedsDisplay:YES];
}

- (void)setImage:(NSImage *)image
{
_image = image;

_imageView.image = (_active && _alternateImage ? _alternateImage : _image);

[self updateViewFrame];
}

Expand All @@ -167,6 +163,9 @@ - (void)setAlternateImage:(NSImage *)image
if (!image && _image) {
_alternateImage = _image;
}

_imageView.image = (_active && _alternateImage ? _alternateImage : _image);

[self updateViewFrame];
}

Expand Down
4 changes: 2 additions & 2 deletions Vagrant Manager/Vagrant Manager-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<string>2.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0</string>
<string>2.0.1</string>
<key>Configuration</key>
<string>${CONFIGURATION}</string>
<key>LSApplicationCategoryType</key>
Expand Down

0 comments on commit a47d3cd

Please sign in to comment.