Elide the fancy sidebar text on the right instead of in the middle. Fixes issue 3335.

This commit is contained in:
David Sansome 2012-12-25 13:10:10 +11:00
parent 29c61f1dc2
commit 351a49e2b4

View File

@ -410,7 +410,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
painter->drawLine(rect.bottomLeft() + QPoint(0,-1), rect.bottomRight()-QPoint(0,1)); painter->drawLine(rect.bottomLeft() + QPoint(0,-1), rect.bottomRight()-QPoint(0,1));
} }
QString tabText(painter->fontMetrics().elidedText(this->tabText(tabIndex), Qt::ElideMiddle, width())); QString tabText(painter->fontMetrics().elidedText(this->tabText(tabIndex), Qt::ElideRight, width()));
QRect tabTextRect(tabRect(tabIndex)); QRect tabTextRect(tabRect(tabIndex));
QRect tabIconRect(tabTextRect); QRect tabIconRect(tabTextRect);
tabIconRect.adjust(+4, +4, -4, -4); tabIconRect.adjust(+4, +4, -4, -4);