mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
[ComboTabBar] Correctly returns tabAt over tab icon
This commit is contained in:
parent
e379b1b655
commit
7fc7558221
|
@ -18,6 +18,7 @@
|
||||||
* ============================================================ */
|
* ============================================================ */
|
||||||
#include "combotabbar.h"
|
#include "combotabbar.h"
|
||||||
#include "toolbutton.h"
|
#include "toolbutton.h"
|
||||||
|
#include "tabicon.h"
|
||||||
#include "mainapplication.h"
|
#include "mainapplication.h"
|
||||||
#include "proxystyle.h"
|
#include "proxystyle.h"
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
|
@ -217,7 +218,8 @@ QRect ComboTabBar::tabRect(int index) const
|
||||||
|
|
||||||
int ComboTabBar::tabAt(const QPoint &pos) const
|
int ComboTabBar::tabAt(const QPoint &pos) const
|
||||||
{
|
{
|
||||||
if (!qobject_cast<TabBarHelper*>(QApplication::widgetAt(mapToGlobal(pos))))
|
QWidget* w = QApplication::widgetAt(mapToGlobal(pos));
|
||||||
|
if (!qobject_cast<TabBarHelper*>(w) && !qobject_cast<TabIcon*>(w))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
int index = m_pinnedTabBarWidget->tabAt(m_pinnedTabBarWidget->mapFromParent(pos));
|
int index = m_pinnedTabBarWidget->tabAt(m_pinnedTabBarWidget->mapFromParent(pos));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user