If you have an issue with any of our projects. feel free to register.

Unverified Commit 515216cd authored by Christopher Snowhill's avatar Christopher Snowhill Committed by GitHub

Merge pull request #73 from nevack/nevack/fix-volume-popover

Fix Volume Slider popover reattaching to window.
parents 0fdabd55 ddf98f7a
......@@ -11,15 +11,12 @@
@implementation VolumeButton {
NSPopover *popover;
NSViewController *viewController;
}
- (void)awakeFromNib
{
popover = [[NSPopover alloc] init];
NSViewController * viewController = [[NSViewController alloc] init];
viewController.view = _popView;
popover.contentViewController = viewController;
popover.behavior = NSPopoverBehaviorTransient;
[popover setContentSize:_popView.bounds.size];
}
......@@ -42,7 +39,12 @@
- (void)mouseDown:(NSEvent *)theEvent
{
[_popView hideToolTip];
[popover close];
viewController = [[NSViewController alloc] init];
viewController.view = _popView;
popover.contentViewController = viewController;
[popover showRelativeToRect:self.bounds ofView:self preferredEdge:NSRectEdgeMaxY];
[super mouseDown:theEvent];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment