mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-21 21:27:07 +01:00
FancyTabWidget: Make sure context menu does not popup outside of tabbar
This commit is contained in:
parent
26e1f015d2
commit
d716617ae0
@ -716,6 +716,11 @@ void FancyTabWidget::addMenuItem(QActionGroup *group, const QString &text, Mode
|
|||||||
|
|
||||||
void FancyTabWidget::contextMenuEvent(QContextMenuEvent *e) {
|
void FancyTabWidget::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
|
||||||
|
if (!QRect(mapToGlobal(pos()), tabBar()->size()).contains(e->globalPos())) {
|
||||||
|
QTabWidget::contextMenuEvent(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!menu_) {
|
if (!menu_) {
|
||||||
menu_ = new QMenu(this);
|
menu_ = new QMenu(this);
|
||||||
QActionGroup *group = new QActionGroup(this);
|
QActionGroup *group = new QActionGroup(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user