mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[TabPreviews] Fix some small tab preview issues with ComboTabBar
This commit is contained in:
parent
e8bbe53edb
commit
3bfa8cecaa
|
@ -494,6 +494,7 @@ void TabBar::showTabPreview()
|
||||||
|
|
||||||
m_tabPreviewTimer->stop();
|
m_tabPreviewTimer->stop();
|
||||||
m_tabPreview->setWebTab(webTab, m_tabPreview->previewIndex() == currentIndex());
|
m_tabPreview->setWebTab(webTab, m_tabPreview->previewIndex() == currentIndex());
|
||||||
|
|
||||||
QRect r(tabRect(m_tabPreview->previewIndex()));
|
QRect r(tabRect(m_tabPreview->previewIndex()));
|
||||||
r.setTopLeft(mapTo(p_QupZilla, r.topLeft()));
|
r.setTopLeft(mapTo(p_QupZilla, r.topLeft()));
|
||||||
r.setBottomRight(mapTo(p_QupZilla, r.bottomRight()));
|
r.setBottomRight(mapTo(p_QupZilla, r.bottomRight()));
|
||||||
|
@ -589,15 +590,12 @@ void TabBar::mouseMoveEvent(QMouseEvent* event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab Preview
|
// Tab Preview
|
||||||
|
|
||||||
const int tab = tabAt(event->pos());
|
const int tab = tabAt(event->pos());
|
||||||
|
|
||||||
if (tab != -1 && tab != m_tabPreview->previewIndex() && event->buttons() == Qt::NoButton && m_dragStartPosition.isNull()) {
|
if (tab != -1 && tab != m_tabPreview->previewIndex() && event->buttons() == Qt::NoButton && m_dragStartPosition.isNull()) {
|
||||||
m_tabPreview->setPreviewIndex(tab);
|
m_tabPreview->setPreviewIndex(tab);
|
||||||
if (m_tabPreview->isVisible()) {
|
|
||||||
showTabPreview();
|
showTabPreview();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ComboTabBar::mouseMoveEvent(event);
|
ComboTabBar::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -642,7 +640,10 @@ bool TabBar::event(QEvent* event)
|
||||||
case QEvent::ToolTip:
|
case QEvent::ToolTip:
|
||||||
if (m_showTabPreviews) {
|
if (m_showTabPreviews) {
|
||||||
QHelpEvent* ev = static_cast<QHelpEvent*>(event);
|
QHelpEvent* ev = static_cast<QHelpEvent*>(event);
|
||||||
if (tabAt(ev->pos()) != -1 && !m_tabPreview->isVisible() && m_dragStartPosition.isNull()) {
|
int index = tabAt(ev->pos());
|
||||||
|
|
||||||
|
if (index != -1 && !m_tabPreview->isVisible() && m_dragStartPosition.isNull()) {
|
||||||
|
m_tabPreview->setPreviewIndex(index);
|
||||||
showTabPreview();
|
showTabPreview();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user