Fix incorrect positions and heights in open/save dialogs when nonstandard font sizes are in use

pull/16/head
Timothy Pearson 12 years ago
parent 857fae6c4f
commit c5463fddb1

@ -214,10 +214,12 @@ void KURLBarItem::paint( TQPainter *p )
p->drawPixmap( margin, yPos, *pm );
if ( !text().isEmpty() ) {
TQFontMetrics fm = p->fontMetrics();
if ( pm->height() < fm.height() )
if ( pm->height() < fm.height() ) {
yPos = fm.ascent() + fm.leading()/2;
else
yPos = pm->height()/2 - fm.height()/2 + fm.ascent();
}
else {
yPos = height(box)/2 - fm.height()/2 + fm.ascent() - margin;
}
yPos += margin;
int stringWidth = box->width() - pm->width() - 2 - (margin * 2);

@ -634,8 +634,8 @@ void TDEIconViewItem::calcRect( const TQString& text_ )
}
if ( ( itemIconRect.height() <= 20 ) && ( itemTextRect.height() < itemIconRect.height() ) ) {
d->realTextHeight = itemTextRect.height();
itemTextRect.setHeight( itemIconRect.height() - 2 );
itemTextRect.setY( itemIconRect.y() );
itemTextRect.setHeight( itemIconRect.height() - 2 );
}
}

Loading…
Cancel
Save