UI: Tray: Fix Zones opening

This commit is contained in:
Nodir Temirkhodjaev 2023-01-23 14:49:18 +03:00
parent f5e5c6ef3b
commit ba014e0523
2 changed files with 6 additions and 4 deletions

View File

@ -7,9 +7,11 @@ ClickableMenu::ClickableMenu(QWidget *parent) : QMenu(parent)
setAttribute(Qt::WA_WindowPropagation); // to inherit default font
}
void ClickableMenu::mousePressEvent(QMouseEvent *event)
void ClickableMenu::mouseReleaseEvent(QMouseEvent *event)
{
QMenu::mousePressEvent(event);
QMenu::mouseReleaseEvent(event);
emit clicked();
if (isVisible()) {
emit clicked();
}
}

View File

@ -14,7 +14,7 @@ signals:
void clicked();
protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
};
#endif // CLICKABLEMENU_H