]> git.sesse.net Git - vlc/commitdiff
qt4: respect qtconfig fontsize on icon_view
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 24 May 2010 18:51:51 +0000 (21:51 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 24 May 2010 18:54:06 +0000 (21:54 +0300)
This may be too big font for some, but static 7 point isn't that good either.

modules/gui/qt4/components/playlist/icon_view.cpp

index 850b39beeefaeed54694f9f9a99c1c2516fcb987..cc5ee7327ac168b630314e032694bdf017b40277 100644 (file)
@@ -160,7 +160,6 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
         painter->setPen( option.palette.color( QPalette::HighlightedText ) );
 
     QFont font( index.data( Qt::FontRole ).value<QFont>() );
-    font.setPointSize( 7 );
 
     //Draw children indicator
     if( !index.data( PLModel::IsLeafNodeRole ).toBool() )
@@ -206,8 +205,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
 
 QSize PlIconViewItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
 {
-    QFont f;
-    f.setPointSize( 7 );
+    QFont f( index.data( Qt::FontRole ).value<QFont>() );
     f.setBold( true );
     QFontMetrics fm( f );
     int textHeight = fm.height();