mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 18:58:55 +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 "baranalyzer.h"
|
||||||
#include "blockanalyzer.h"
|
#include "blockanalyzer.h"
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
#include <QMouseEvent>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
@ -34,8 +34,9 @@ AnalyzerContainer::AnalyzerContainer(QWidget *parent)
|
|||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalyzerContainer::contextMenuEvent(QContextMenuEvent* e) {
|
void AnalyzerContainer::mouseReleaseEvent(QMouseEvent* e) {
|
||||||
context_menu_->popup(e->globalPos());
|
if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton)
|
||||||
|
context_menu_->popup(e->globalPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalyzerContainer::set_engine(EngineBase *engine) {
|
void AnalyzerContainer::set_engine(EngineBase *engine) {
|
||||||
|
@ -19,7 +19,7 @@ public:
|
|||||||
static const char* kSettingsGroup;
|
static const char* kSettingsGroup;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void contextMenuEvent(QContextMenuEvent *);
|
void mouseReleaseEvent(QMouseEvent *);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ChangeAnalyzer(int id);
|
void ChangeAnalyzer(int id);
|
||||||
|
Loading…
Reference in New Issue
Block a user