mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Show the analyzer popup menu on a left click as well as a right click
This commit is contained in:
parent
a7596959eb
commit
2e1023457c
@ -2,7 +2,7 @@
|
||||
#include "baranalyzer.h"
|
||||
#include "blockanalyzer.h"
|
||||
|
||||
#include <QContextMenuEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QHBoxLayout>
|
||||
#include <QSettings>
|
||||
|
||||
@ -34,8 +34,9 @@ AnalyzerContainer::AnalyzerContainer(QWidget *parent)
|
||||
Load();
|
||||
}
|
||||
|
||||
void AnalyzerContainer::contextMenuEvent(QContextMenuEvent* e) {
|
||||
context_menu_->popup(e->globalPos());
|
||||
void AnalyzerContainer::mouseReleaseEvent(QMouseEvent* e) {
|
||||
if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton)
|
||||
context_menu_->popup(e->globalPos());
|
||||
}
|
||||
|
||||
void AnalyzerContainer::set_engine(EngineBase *engine) {
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
static const char* kSettingsGroup;
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
|
||||
private slots:
|
||||
void ChangeAnalyzer(int id);
|
||||
|
Loading…
Reference in New Issue
Block a user