mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Set sensible captions / descriptions for our various view modi.
This commit is contained in:
@@ -19,9 +19,12 @@ InfoBar::InfoBar( QWidget* parent )
|
|||||||
QFont boldFont = ui->captionLabel->font();
|
QFont boldFont = ui->captionLabel->font();
|
||||||
boldFont.setPixelSize( 18 );
|
boldFont.setPixelSize( 18 );
|
||||||
boldFont.setBold( true );
|
boldFont.setBold( true );
|
||||||
|
|
||||||
ui->captionLabel->setFont( boldFont );
|
ui->captionLabel->setFont( boldFont );
|
||||||
|
|
||||||
|
boldFont.setPixelSize( 12 );
|
||||||
|
ui->descriptionLabel->setFont( boldFont );
|
||||||
|
ui->descriptionLabel->setMargin( 2 );
|
||||||
|
|
||||||
QPalette whitePal = ui->captionLabel->palette();
|
QPalette whitePal = ui->captionLabel->palette();
|
||||||
whitePal.setColor( QPalette::Foreground, Qt::white );
|
whitePal.setColor( QPalette::Foreground, Qt::white );
|
||||||
|
|
||||||
|
@@ -176,6 +176,9 @@ PlaylistManager::show( const Tomahawk::playlist_ptr& playlist )
|
|||||||
m_currentInterface = view->proxyModel();
|
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_superCollectionVisible = false;
|
||||||
m_statsAvailable = true;
|
m_statsAvailable = true;
|
||||||
m_modesAvailable = false;
|
m_modesAvailable = false;
|
||||||
@@ -203,6 +206,9 @@ PlaylistManager::show( const Tomahawk::dynplaylist_ptr& playlist )
|
|||||||
m_stack->setCurrentWidget( m_dynamicWidgets.value( playlist ) );
|
m_stack->setCurrentWidget( m_dynamicWidgets.value( playlist ) );
|
||||||
m_currentInterface = m_dynamicWidgets.value( playlist )->playlistInterface();
|
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_superCollectionVisible = false;
|
||||||
m_statsAvailable = true;
|
m_statsAvailable = true;
|
||||||
m_modesAvailable = false;
|
m_modesAvailable = false;
|
||||||
@@ -244,6 +250,9 @@ PlaylistManager::show( const Tomahawk::artist_ptr& artist )
|
|||||||
m_currentInterface = view->proxyModel();
|
m_currentInterface = view->proxyModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_infobar->setCaption( tr( "All tracks by %1" ).arg( artist->name() ) );
|
||||||
|
m_infobar->setDescription( "" );
|
||||||
|
|
||||||
m_superCollectionVisible = false;
|
m_superCollectionVisible = false;
|
||||||
m_statsAvailable = false;
|
m_statsAvailable = false;
|
||||||
m_modesAvailable = false;
|
m_modesAvailable = false;
|
||||||
@@ -282,6 +291,9 @@ PlaylistManager::show( const Tomahawk::album_ptr& album )
|
|||||||
m_currentInterface = view->proxyModel();
|
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_superCollectionVisible = false;
|
||||||
m_statsAvailable = false;
|
m_statsAvailable = false;
|
||||||
m_modesAvailable = 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_superCollectionVisible = false;
|
||||||
m_statsAvailable = ( m_currentMode == 0 );
|
m_statsAvailable = ( m_currentMode == 0 );
|
||||||
m_modesAvailable = true;
|
m_modesAvailable = true;
|
||||||
@@ -377,6 +395,9 @@ PlaylistManager::show( const Tomahawk::source_ptr& source )
|
|||||||
m_currentInfoWidget = m_sourceViews.value( 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_stack->setCurrentWidget( m_currentInfoWidget );
|
||||||
m_superCollectionVisible = false;
|
m_superCollectionVisible = false;
|
||||||
m_statsAvailable = false;
|
m_statsAvailable = false;
|
||||||
@@ -438,6 +459,9 @@ PlaylistManager::showSuperCollection()
|
|||||||
m_currentInterface = m_superAlbumView->proxyModel();
|
m_currentInterface = m_superAlbumView->proxyModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_infobar->setCaption( tr( "Super Collection" ) );
|
||||||
|
m_infobar->setDescription( tr( "All available tracks" ) );
|
||||||
|
|
||||||
m_superCollectionVisible = true;
|
m_superCollectionVisible = true;
|
||||||
m_statsAvailable = ( m_currentMode == 0 );
|
m_statsAvailable = ( m_currentMode == 0 );
|
||||||
m_modesAvailable = true;
|
m_modesAvailable = true;
|
||||||
|
@@ -20,7 +20,6 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
|
|||||||
{
|
{
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
|
|
||||||
ui->sourceLabel->setText( source->friendlyName() );
|
|
||||||
ui->historyView->overlay()->setEnabled( false );
|
ui->historyView->overlay()->setEnabled( false );
|
||||||
|
|
||||||
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
|
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
|
||||||
|
@@ -11,23 +11,6 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<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>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
Reference in New Issue
Block a user