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:
@@ -89,7 +89,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
|
|||||||
|
|
||||||
if ( type == SourcesModel::Collection )
|
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 )
|
else if ( type == SourcesModel::Divider )
|
||||||
{
|
{
|
||||||
@@ -114,7 +114,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
|
|||||||
return m_expandedMap.value( index )->size();
|
return m_expandedMap.value( index )->size();
|
||||||
}
|
}
|
||||||
else
|
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 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -70,11 +70,12 @@ SourceTreeView::SourceTreeView( QWidget* parent )
|
|||||||
|
|
||||||
QFont fnt;
|
QFont fnt;
|
||||||
fnt.setPointSize( font().pointSize() - 1 );
|
fnt.setPointSize( font().pointSize() - 1 );
|
||||||
|
setFont( fnt );
|
||||||
|
|
||||||
QFontMetrics fm( fnt );
|
QFontMetrics fm( fnt );
|
||||||
// This is sort of the longest string in there. With translations
|
// 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
|
// we will never get it right so setting it to something reasonable for the average case
|
||||||
setMinimumWidth( fm.width( "Track Album Artist Local Top10") );
|
setMinimumWidth( fm.width( "Track Album Artist Local Top10") );
|
||||||
setFont( fnt );
|
|
||||||
|
|
||||||
setHeaderHidden( true );
|
setHeaderHidden( true );
|
||||||
setRootIsDecorated( true );
|
setRootIsDecorated( true );
|
||||||
|
Reference in New Issue
Block a user