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

* Moved album & artist name out of the PlayableCover in AlbumInfoWidget.

This commit is contained in:
Christian Muehlhaeuser
2013-07-17 00:07:46 +02:00
parent 69691bb217
commit ec7cd0aa09
2 changed files with 100 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Original, QSize( 48, 48 ) );
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Grid, ui->cover->size() ) );
ui->cover->setShowText( true );
ui->cover->setShowText( false );
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
@@ -124,9 +124,36 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
// connect( ui->biography, SIGNAL( anchorClicked( QUrl ) ), SLOT( onBiographyLinkClicked( QUrl ) ) );
}
{
QFont f = ui->albumLabel->font();
f.setFamily( "Titillium Web" );
QPalette p = ui->albumLabel->palette();
p.setColor( QPalette::Foreground, TomahawkStyle::HEADER_LABEL );
ui->albumLabel->setFont( f );
ui->albumLabel->setPalette( p );
}
{
ui->artistLabel->setContentsMargins( 6, 2, 6, 2 );
ui->artistLabel->setElideMode( Qt::ElideMiddle );
ui->artistLabel->setType( QueryLabel::Artist );
connect( ui->artistLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
QFont f = ui->artistLabel->font();
f.setFamily( "Titillium Web" );
QPalette p = ui->artistLabel->palette();
p.setColor( QPalette::Foreground, TomahawkStyle::HEADER_TEXT );
ui->artistLabel->setFont( f );
ui->artistLabel->setPalette( p );
}
{
QFont f = ui->label->font();
f.setFamily( "Pathway Gothic One" );
f.setFamily( "Pathway Gothic One" );
QPalette p = ui->label->palette();
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_CAPTION );
@@ -228,6 +255,8 @@ AlbumInfoWidget::load( const album_ptr& album )
ui->label_2->setText( tr( "Other Albums by %1" ).arg( album->artist()->name() ) );
ui->cover->setAlbum( album );
ui->albumLabel->setText( album->name() );
ui->artistLabel->setArtist( album->artist() );
m_tracksModel->startLoading();
m_tracksModel->addTracks( album, QModelIndex(), true );

View File

@@ -50,6 +50,70 @@
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="albumLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>26</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true" extracomment="not translatable because not shown to the user">TrackName</string>
</property>
<property name="indent">
<number>4</number>
</property>
</widget>
</item>
<item>
<widget class="QueryLabel" name="artistLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string notr="true" extracomment="not translatable because not shown to the user">ArtistName</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTextBrowser" name="biography">
<property name="sizePolicy">
@@ -283,6 +347,11 @@
<extends>QTreeView</extends>
<header>playlist/TrackView.h</header>
</customwidget>
<customwidget>
<class>QueryLabel</class>
<extends>QLabel</extends>
<header>widgets/QueryLabel.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>