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

Commit ddf98f7a authored by Dmitry Nevedomsky's avatar Dmitry Nevedomsky

Fix Volume Slider popover reattaching to window.

parent 0fdabd55
......@@ -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