From kde-commits Sat Jan 06 17:04:40 2007 From: Germain Garand Date: Sat, 06 Jan 2007 17:04:40 +0000 To: kde-commits Subject: branches/KDE/3.5/kdelibs/khtml/rendering Message-Id: <1168103080.330924.24543.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=116810310603320 SVN commit 620584 by ggarand: backport r620582. "fix RenderFileButton minmaxwidth calculation" M +2 -2 render_form.cpp --- branches/KDE/3.5/kdelibs/khtml/rendering/render_form.cpp #620583:620584 @@ -786,13 +786,13 @@ int size = element()->size(); int h = fm.lineSpacing(); - int w = fm.width( 'x' ) * (size > 0 ? size : 17); // "some" + int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some" KLineEdit* edit = static_cast( m_widget )->lineEdit(); QSize s = edit->style().sizeFromContents(QStyle::CT_LineEdit, edit, QSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(QApplication::globalStrut()); - QSize bs = static_cast( m_widget )->sizeHint(); + QSize bs = static_cast( m_widget )->minimumSizeHint() - edit->minimumSizeHint(); setIntrinsicWidth( s.width() + bs.width() ); setIntrinsicHeight( kMax(s.height(), bs.height()) );