Show fullsize cover on doubleclick

This commit is contained in:
Jonas Kvinge 2019-11-19 21:20:36 +01:00
parent ea47fae31e
commit b386ca14df
2 changed files with 6 additions and 2 deletions

View File

@ -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_);
}
}

View File

@ -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);