Improved styling of project target selector

This commit is contained in:
Jens Bache-Wiig
2010-02-24 19:23:40 +01:00
parent 8fbf0dd08f
commit 7af1e21144
10 changed files with 170 additions and 97 deletions

View File

@@ -293,6 +293,10 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
painter->restore();
}
#endif
if (!enabled)
painter->setOpacity(0.7);
int textHeight = painter->fontMetrics().boundingRect(QRect(0, 0, width(), height()), Qt::TextWordWrap, tabText).height();
tabIconRect.adjust(0, 4, 0, -textHeight);
int iconSize = qMin(tabIconRect.width(), tabIconRect.height());