don't fade the label if the width is exactly the text width

svn path=/trunk/KDE/kdelibs/; revision=1046037
This commit is contained in:
Marco Martin 2009-11-07 10:56:06 +00:00
parent 6de1341e1b
commit 8c047a91eb

View File

@ -255,7 +255,7 @@ void Label::paint(QPainter *painter,
QLabel *native = nativeWidget(); QLabel *native = nativeWidget();
QFontMetrics fm = native->font(); QFontMetrics fm = native->font();
if (native->wordWrap() || native->text().isEmpty() || size().width() > fm.width(native->text())) { if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {
QGraphicsProxyWidget::paint(painter, option, widget); QGraphicsProxyWidget::paint(painter, option, widget);
} else { } else {
const int gradientLength = 25; const int gradientLength = 25;