mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-05 12:56:52 +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) {
|
||||
|
||||
if (!QRect(mapToGlobal(pos()), tabBar()->size()).contains(e->globalPos())) {
|
||||
QTabWidget::contextMenuEvent(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!menu_) {
|
||||
menu_ = new QMenu(this);
|
||||
QActionGroup *group = new QActionGroup(this);
|
||||
|
Loading…
Reference in New Issue
Block a user