summaryrefslogtreecommitdiff
path: root/src/tabhighlighteffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabhighlighteffect.cpp')
-rw-r--r--src/tabhighlighteffect.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tabhighlighteffect.cpp b/src/tabhighlighteffect.cpp
index b2d1e0df..b92017cf 100644
--- a/src/tabhighlighteffect.cpp
+++ b/src/tabhighlighteffect.cpp
@@ -63,6 +63,9 @@ void TabHighlightEffect::draw(QPainter *painter)
qreal opacity = property(propertyName).toReal();
QRect textRect = m_tabBar->tabTextRect(index);
+ if (!boundingRect().contains(textRect))
+ continue;
+
QString tabText = m_tabBar->fontMetrics().elidedText(m_tabBar->tabText(index), Qt::ElideRight,
textRect.width(), Qt::TextShowMnemonic);