mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
* Moved album & artist name out of the PlayableCover in AlbumInfoWidget.
This commit is contained in:
@@ -53,7 +53,7 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
|
|||||||
|
|
||||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Original, QSize( 48, 48 ) );
|
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->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->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
||||||
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
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 ) ) );
|
// 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();
|
QFont f = ui->label->font();
|
||||||
f.setFamily( "Pathway Gothic One" );
|
f.setFamily( "Pathway Gothic One" );
|
||||||
|
|
||||||
QPalette p = ui->label->palette();
|
QPalette p = ui->label->palette();
|
||||||
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_CAPTION );
|
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->label_2->setText( tr( "Other Albums by %1" ).arg( album->artist()->name() ) );
|
||||||
ui->cover->setAlbum( album );
|
ui->cover->setAlbum( album );
|
||||||
|
ui->albumLabel->setText( album->name() );
|
||||||
|
ui->artistLabel->setArtist( album->artist() );
|
||||||
|
|
||||||
m_tracksModel->startLoading();
|
m_tracksModel->startLoading();
|
||||||
m_tracksModel->addTracks( album, QModelIndex(), true );
|
m_tracksModel->addTracks( album, QModelIndex(), true );
|
||||||
|
@@ -50,6 +50,70 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QTextBrowser" name="biography">
|
<widget class="QTextBrowser" name="biography">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -283,6 +347,11 @@
|
|||||||
<extends>QTreeView</extends>
|
<extends>QTreeView</extends>
|
||||||
<header>playlist/TrackView.h</header>
|
<header>playlist/TrackView.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>QueryLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>widgets/QueryLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Reference in New Issue
Block a user