1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-18 11:51:44 +02:00

* Fixed sidebar sizehints.

This commit is contained in:
Christian Muehlhaeuser
2012-08-06 02:26:31 +02:00
parent 260c0f5d2f
commit a5d67f1912
2 changed files with 4 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
if ( type == SourcesModel::Collection )
{
return QSize( option.rect.width(), option.fontMetrics.height() * 2.8 );
return QSize( option.rect.width(), option.fontMetrics.height() * 3.0 );
}
else if ( type == SourcesModel::Divider )
{
@@ -114,7 +114,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
return m_expandedMap.value( index )->size();
}
else
return QSize( option.rect.width(), option.fontMetrics.height() * 1.2 ); //QStyledItemDelegate::sizeHint( option, index ) );
return QSize( option.rect.width(), option.fontMetrics.height() * 1.4 ); //QStyledItemDelegate::sizeHint( option, index ) );
}

View File

@@ -70,11 +70,12 @@ SourceTreeView::SourceTreeView( QWidget* parent )
QFont fnt;
fnt.setPointSize( font().pointSize() - 1 );
setFont( fnt );
QFontMetrics fm( fnt );
// This is sort of the longest string in there. With translations
// we will never get it right so setting it to something reasonable for the average case
setMinimumWidth( fm.width( "Track Album Artist Local Top10") );
setFont( fnt );
setHeaderHidden( true );
setRootIsDecorated( true );