Commit 6ea06756 authored by Ilkka Ollakka's avatar Ilkka Ollakka

qt4: respect qtconfig fontsize on icon_view

This may be too big font for some, but static 7 point isn't that good either.
parent 38d8ba27
...@@ -160,7 +160,6 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -160,7 +160,6 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
painter->setPen( option.palette.color( QPalette::HighlightedText ) ); painter->setPen( option.palette.color( QPalette::HighlightedText ) );
QFont font( index.data( Qt::FontRole ).value<QFont>() ); QFont font( index.data( Qt::FontRole ).value<QFont>() );
font.setPointSize( 7 );
//Draw children indicator //Draw children indicator
if( !index.data( PLModel::IsLeafNodeRole ).toBool() ) if( !index.data( PLModel::IsLeafNodeRole ).toBool() )
...@@ -206,8 +205,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -206,8 +205,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
QSize PlIconViewItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const QSize PlIconViewItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
{ {
QFont f; QFont f( index.data( Qt::FontRole ).value<QFont>() );
f.setPointSize( 7 );
f.setBold( true ); f.setBold( true );
QFontMetrics fm( f ); QFontMetrics fm( f );
int textHeight = fm.height(); int textHeight = fm.height();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment