From b386ca14dfed1742ea7046b57fb2d7eb9bf5be7a Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 19 Nov 2019 21:20:36 +0100 Subject: [PATCH] Show fullsize cover on doubleclick --- src/widgets/playingwidget.cpp | 6 +++++- src/widgets/playingwidget.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widgets/playingwidget.cpp b/src/widgets/playingwidget.cpp index aec9469aa..5341612a1 100644 --- a/src/widgets/playingwidget.cpp +++ b/src/widgets/playingwidget.cpp @@ -474,8 +474,12 @@ void PlayingWidget::contextMenuEvent(QContextMenuEvent* e) { menu_->popup(mapToGlobal(e->pos())); } -void PlayingWidget::mouseReleaseEvent(QMouseEvent*) { +void PlayingWidget::mouseDoubleClickEvent(QMouseEvent* e) { + // Same behaviour as right-click > Show Fullsize + if (e->button() == Qt::LeftButton && song_.is_valid()) { + album_cover_choice_controller_->ShowCover(song_, image_original_); + } } diff --git a/src/widgets/playingwidget.h b/src/widgets/playingwidget.h index 70a07f3f9..2dd856103 100644 --- a/src/widgets/playingwidget.h +++ b/src/widgets/playingwidget.h @@ -89,7 +89,7 @@ class PlayingWidget : public QWidget { void paintEvent(QPaintEvent *e); void resizeEvent(QResizeEvent*); void contextMenuEvent(QContextMenuEvent *e); - void mouseReleaseEvent(QMouseEvent*); + void mouseDoubleClickEvent(QMouseEvent*); void dragEnterEvent(QDragEnterEvent *e); void dropEvent(QDropEvent *e);