Mouse wheel now works when the volume slider is being displayed.
parent
1817e58d2d
commit
511b18cdd6
|
@ -8,10 +8,7 @@
|
|||
|
||||
#import "PopupButton.h"
|
||||
|
||||
@class PlaybackController;
|
||||
|
||||
@interface VolumeButton : PopupButton {
|
||||
IBOutlet PlaybackController *playbackController;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#import "VolumeButton.h"
|
||||
#import "VolumeSlider.h"
|
||||
#import "PlaybackController.h"
|
||||
|
||||
@implementation VolumeButton
|
||||
|
||||
|
@ -17,7 +18,7 @@
|
|||
|
||||
[(VolumeSlider *)_popView setDoubleValue:[(VolumeSlider *)_popView doubleValue] + change];
|
||||
|
||||
[playbackController changeVolume:_popView];
|
||||
[[(VolumeSlider *)_popView target] changeVolume:_popView];
|
||||
|
||||
[(VolumeSlider *)_popView showToolTipForDuration:1.0];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
//
|
||||
|
||||
#import "VolumeSlider.h"
|
||||
#import "PlaybackController.h"
|
||||
#import "CogAudio/Helper.h"
|
||||
|
||||
@implementation VolumeSlider
|
||||
|
@ -83,5 +84,15 @@
|
|||
return [super sendAction:theAction to:theTarget];
|
||||
}
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)theEvent
|
||||
{
|
||||
double change = [theEvent deltaY];
|
||||
|
||||
[self setDoubleValue:[self doubleValue] + change];
|
||||
|
||||
[[self target] changeVolume:self];
|
||||
|
||||
[self showToolTipForDuration:1.0];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue