Star/unstar playlist with doubleclick

This commit is contained in:
Jonas Kvinge 2020-11-02 17:45:29 +01:00
parent 75a0b924c3
commit 8718a16889
2 changed files with 2 additions and 4 deletions

View File

@ -70,9 +70,7 @@ void FavoriteWidget::paintEvent(QPaintEvent *e) {
}
void FavoriteWidget::mouseReleaseEvent(QMouseEvent *e) {
Q_UNUSED(e);
void FavoriteWidget::mouseDoubleClickEvent(QMouseEvent *e) {
favorite_ = !favorite_;
update();

View File

@ -46,7 +46,7 @@ class FavoriteWidget : public QWidget {
protected:
void paintEvent(QPaintEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent*) override;
private:
static const int kStarSize;