Mouse wheel now works when the volume slider is being displayed.
This commit is contained in:
parent
1817e58d2d
commit
511b18cdd6
3 changed files with 13 additions and 4 deletions
|
@ -8,10 +8,7 @@
|
||||||
|
|
||||||
#import "PopupButton.h"
|
#import "PopupButton.h"
|
||||||
|
|
||||||
@class PlaybackController;
|
|
||||||
|
|
||||||
@interface VolumeButton : PopupButton {
|
@interface VolumeButton : PopupButton {
|
||||||
IBOutlet PlaybackController *playbackController;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#import "VolumeButton.h"
|
#import "VolumeButton.h"
|
||||||
#import "VolumeSlider.h"
|
#import "VolumeSlider.h"
|
||||||
|
#import "PlaybackController.h"
|
||||||
|
|
||||||
@implementation VolumeButton
|
@implementation VolumeButton
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
|
|
||||||
[(VolumeSlider *)_popView setDoubleValue:[(VolumeSlider *)_popView doubleValue] + change];
|
[(VolumeSlider *)_popView setDoubleValue:[(VolumeSlider *)_popView doubleValue] + change];
|
||||||
|
|
||||||
[playbackController changeVolume:_popView];
|
[[(VolumeSlider *)_popView target] changeVolume:_popView];
|
||||||
|
|
||||||
[(VolumeSlider *)_popView showToolTipForDuration:1.0];
|
[(VolumeSlider *)_popView showToolTipForDuration:1.0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "VolumeSlider.h"
|
#import "VolumeSlider.h"
|
||||||
|
#import "PlaybackController.h"
|
||||||
#import "CogAudio/Helper.h"
|
#import "CogAudio/Helper.h"
|
||||||
|
|
||||||
@implementation VolumeSlider
|
@implementation VolumeSlider
|
||||||
|
@ -83,5 +84,15 @@
|
||||||
return [super sendAction:theAction to:theTarget];
|
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
|
@end
|
||||||
|
|
Loading…
Reference in a new issue