1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 08:52:12 +02:00

* Set sensible captions / descriptions for our various view modi.

This commit is contained in:
Christian Muehlhaeuser 2011-02-16 11:28:02 +01:00
parent cb8eb876a5
commit cc66ebf70c
4 changed files with 28 additions and 19 deletions
src/libtomahawk

@ -19,9 +19,12 @@ InfoBar::InfoBar( QWidget* parent )
QFont boldFont = ui->captionLabel->font();
boldFont.setPixelSize( 18 );
boldFont.setBold( true );
ui->captionLabel->setFont( boldFont );
boldFont.setPixelSize( 12 );
ui->descriptionLabel->setFont( boldFont );
ui->descriptionLabel->setMargin( 2 );
QPalette whitePal = ui->captionLabel->palette();
whitePal.setColor( QPalette::Foreground, Qt::white );

@ -176,6 +176,9 @@ PlaylistManager::show( const Tomahawk::playlist_ptr& playlist )
m_currentInterface = view->proxyModel();
}
m_infobar->setCaption( playlist->title() );
m_infobar->setDescription( tr( "A playlist by %1" ).arg( playlist->author()->isLocal() ? tr( "you" ) : playlist->author()->friendlyName() ) );
m_superCollectionVisible = false;
m_statsAvailable = true;
m_modesAvailable = false;
@ -202,6 +205,9 @@ PlaylistManager::show( const Tomahawk::dynplaylist_ptr& playlist )
m_stack->setCurrentWidget( m_dynamicWidgets.value( playlist ) );
m_currentInterface = m_dynamicWidgets.value( playlist )->playlistInterface();
m_infobar->setCaption( playlist->title() );
m_infobar->setDescription( tr( "A playlist by %1" ).arg( playlist->author()->isLocal() ? tr( "you" ) : playlist->author()->friendlyName() ) );
m_superCollectionVisible = false;
m_statsAvailable = true;
@ -244,6 +250,9 @@ PlaylistManager::show( const Tomahawk::artist_ptr& artist )
m_currentInterface = view->proxyModel();
}
m_infobar->setCaption( tr( "All tracks by %1" ).arg( artist->name() ) );
m_infobar->setDescription( "" );
m_superCollectionVisible = false;
m_statsAvailable = false;
m_modesAvailable = false;
@ -282,6 +291,9 @@ PlaylistManager::show( const Tomahawk::album_ptr& album )
m_currentInterface = view->proxyModel();
}
m_infobar->setCaption( tr( "All tracks on %1 by %2" ).arg( album->artist()->name() ).arg( album->name() ) );
m_infobar->setDescription( "" );
m_superCollectionVisible = false;
m_statsAvailable = false;
m_modesAvailable = false;
@ -348,6 +360,12 @@ PlaylistManager::show( const Tomahawk::collection_ptr& collection )
}
}
m_infobar->setDescription( "" );
if ( collection->source()->isLocal() )
m_infobar->setCaption( tr( "Your Collection" ) );
else
m_infobar->setCaption( tr( "Collection of %1" ).arg( collection->source()->friendlyName() ) );
m_superCollectionVisible = false;
m_statsAvailable = ( m_currentMode == 0 );
m_modesAvailable = true;
@ -377,6 +395,9 @@ PlaylistManager::show( const Tomahawk::source_ptr& source )
m_currentInfoWidget = m_sourceViews.value( source );
}
m_infobar->setCaption( tr( "Info about %1" ).arg( source->isLocal() ? tr( "Your Collection" ) : source->friendlyName() ) );
m_infobar->setDescription( "" );
m_stack->setCurrentWidget( m_currentInfoWidget );
m_superCollectionVisible = false;
m_statsAvailable = false;
@ -438,6 +459,9 @@ PlaylistManager::showSuperCollection()
m_currentInterface = m_superAlbumView->proxyModel();
}
m_infobar->setCaption( tr( "Super Collection" ) );
m_infobar->setDescription( tr( "All available tracks" ) );
m_superCollectionVisible = true;
m_statsAvailable = ( m_currentMode == 0 );
m_modesAvailable = true;

@ -20,7 +20,6 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
{
ui->setupUi( this );
ui->sourceLabel->setText( source->friendlyName() );
ui->historyView->overlay()->setEnabled( false );
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );

@ -11,23 +11,6 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="sourceLabel">
<property name="font">
<font>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Source Name</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>