layout code improved

This commit is contained in:
Uwe Rathmann 2021-12-24 16:18:46 +01:00
parent fa6fc7b4c1
commit 1beec5e599

View File

@ -285,10 +285,13 @@ qreal QskSimpleListBox::columnWidth( int col ) const
qreal QskSimpleListBox::rowHeight() const
{
const auto hint = strutSizeHint( Cell );
const auto padding = paddingHint( Cell );
const QFontMetricsF fm( effectiveFont( Text ) );
return fm.height() + padding.top() + padding.bottom();
qreal h = effectiveFontHeight( Text );
h += padding.top() + padding.bottom();
return qMax( h, hint.height() );
}
#include "moc_QskSimpleListBox.cpp"