mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:36:28 +00:00
UI: Tray: Fix Zones opening
This commit is contained in:
parent
f5e5c6ef3b
commit
ba014e0523
@ -7,9 +7,11 @@ ClickableMenu::ClickableMenu(QWidget *parent) : QMenu(parent)
|
|||||||
setAttribute(Qt::WA_WindowPropagation); // to inherit default font
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ signals:
|
|||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *event) override;
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CLICKABLEMENU_H
|
#endif // CLICKABLEMENU_H
|
||||||
|
Loading…
Reference in New Issue
Block a user