From 4dc623d66b5ea2c605dbed6bce2d5cbeb6a2f330 Mon Sep 17 00:00:00 2001 From: craig Date: Wed, 7 Dec 2011 21:11:13 +0000 Subject: [PATCH] Allow fancytab rmb menu to be all the way down --- TODO | 4 ---- widgets/fancytabwidget.cpp | 13 ++++++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index 61f9a967c..a59b95cfc 100644 --- a/TODO +++ b/TODO @@ -2,12 +2,8 @@ Lyrics Add next/prev provide buttons - so that can try others. FancyTabWidget - - Allow context menu all the way down tab side - When click on an already active tab, hide the associated widget Need better repeat icon. -Support streams - for radio! - Will probably need to store mapping from URL to name, so that can show this in title. - How does MPD store this - it doesnt! Could probably save as a playlist with 1 entry? diff --git a/widgets/fancytabwidget.cpp b/widgets/fancytabwidget.cpp index 6673cc972..4492348d7 100644 --- a/widgets/fancytabwidget.cpp +++ b/widgets/fancytabwidget.cpp @@ -688,9 +688,16 @@ void FancyTabWidget::contextMenuEvent(QContextMenuEvent* e) { return; } - QWidget *widget=QApplication::widgetAt(e->globalPos()); - - if (!widget || !(qobject_cast(widget) || (qobject_cast(widget) && widget==tab_bar_))) { + // Check we are over tab space... + if (Mode_IconOnlyTopTabs!=mode_ && Mode_TopTabs!=mode_){ + if (Qt::RightToLeft==QApplication::layoutDirection()) { + if (e->pos().x()<=side_widget_->pos().x()) { + return; + } + } else if (e->pos().x()>=side_widget_->rect().right()) { + return; + } + } else if (QApplication::widgetAt(e->globalPos())!=tab_bar_) { return; } if (!menu_) {