mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-19 12:53:25 +01:00
Make wheel events on the analyzer change the volume. Fixes issue 3761
This commit is contained in:
parent
b31c646090
commit
b1c488ffea
@ -123,7 +123,11 @@ void AnalyzerContainer::mouseDoubleClickEvent(QMouseEvent *) {
|
||||
visualisation_action_->trigger();
|
||||
}
|
||||
|
||||
void AnalyzerContainer::SetEngine(EngineBase *engine) {
|
||||
void AnalyzerContainer::wheelEvent(QWheelEvent* e) {
|
||||
emit WheelEvent(e->delta());
|
||||
}
|
||||
|
||||
void AnalyzerContainer::SetEngine(EngineBase* engine) {
|
||||
if (current_analyzer_)
|
||||
current_analyzer_->set_engine(engine);
|
||||
engine_ = engine;
|
||||
|
@ -37,9 +37,13 @@ public:
|
||||
static const char* kSettingsGroup;
|
||||
static const char* kSettingsFramerate;
|
||||
|
||||
signals:
|
||||
void WheelEvent(int delta);
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void mouseDoubleClickEvent(QMouseEvent *);
|
||||
void wheelEvent(QWheelEvent* e);
|
||||
|
||||
private slots:
|
||||
void ChangeAnalyzer(int id);
|
||||
|
@ -634,6 +634,7 @@ MainWindow::MainWindow(Application* app,
|
||||
// Analyzer
|
||||
ui_->analyzer->SetEngine(app_->player()->engine());
|
||||
ui_->analyzer->SetActions(ui_->action_visualisations);
|
||||
connect(ui_->analyzer, SIGNAL(WheelEvent(int)), SLOT(VolumeWheelEvent(int)));
|
||||
|
||||
// Equalizer
|
||||
qLog(Debug) << "Creating equalizer";
|
||||
|
Loading…
Reference in New Issue
Block a user