mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Show More link for albums on artist pages.
This commit is contained in:
@@ -142,7 +142,9 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
|
|
||||||
f.setPointSize( 11 );
|
f.setPointSize( 11 );
|
||||||
ui->topHitsMoreLabel->setFont( f );
|
ui->topHitsMoreLabel->setFont( f );
|
||||||
|
ui->albumsMoreLabel->setFont( f );
|
||||||
|
|
||||||
|
connect( ui->albumsMoreLabel, SIGNAL( clicked() ), SLOT( onAlbumsMoreClicked() ) );
|
||||||
connect( ui->topHitsMoreLabel, SIGNAL( clicked() ), SLOT( onTopHitsMoreClicked() ) );
|
connect( ui->topHitsMoreLabel, SIGNAL( clicked() ), SLOT( onTopHitsMoreClicked() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,6 +186,38 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
|
|
||||||
connect( topHitsFullView, SIGNAL( closeClicked() ), SLOT( onTopHitsMoreClosed() ) );
|
connect( topHitsFullView, SIGNAL( closeClicked() ), SLOT( onTopHitsMoreClosed() ) );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
GridView* albumsFullView = new GridView( m_stackedWidget );
|
||||||
|
// albumsFullView->setCaption( tr( "Albums" ) );
|
||||||
|
// albumsFullView->setShowCloseButton( true );
|
||||||
|
albumsFullView->setPlayableModel( m_albumsModel );
|
||||||
|
albumsFullView->proxyModel()->setHideDupeItems( true );
|
||||||
|
|
||||||
|
CaptionLabel* captionLabel = new CaptionLabel( this );
|
||||||
|
captionLabel->setText( tr( "Albums" ) );
|
||||||
|
captionLabel->setShowCloseButton( true );
|
||||||
|
|
||||||
|
QWidget* vbox = new QWidget;
|
||||||
|
QPalette pal = vbox->palette();
|
||||||
|
pal.setBrush( vbox->backgroundRole(), Qt::white );
|
||||||
|
vbox->setPalette( pal );
|
||||||
|
vbox->setAutoFillBackground( true );
|
||||||
|
|
||||||
|
QVBoxLayout* vboxl = new QVBoxLayout;
|
||||||
|
TomahawkUtils::unmarginLayout( vboxl );
|
||||||
|
vboxl->setContentsMargins( 32, 32, 32, 32 );
|
||||||
|
vboxl->setSpacing( 8 );
|
||||||
|
vbox->setLayout( vboxl );
|
||||||
|
|
||||||
|
vboxl->addWidget( captionLabel );
|
||||||
|
vboxl->addWidget( albumsFullView );
|
||||||
|
vboxl->addStretch();
|
||||||
|
vboxl->setStretchFactor( albumsFullView, 1 );
|
||||||
|
|
||||||
|
m_stackedWidget->addWidget( vbox );
|
||||||
|
|
||||||
|
connect( captionLabel, SIGNAL( clicked() ), SLOT( onTopHitsMoreClosed() ) );
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
@@ -304,6 +338,7 @@ ArtistInfoWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums, Model
|
|||||||
{
|
{
|
||||||
Q_UNUSED( mode );
|
Q_UNUSED( mode );
|
||||||
|
|
||||||
|
// m_albumsModel->clear();
|
||||||
m_albumsModel->appendAlbums( albums );
|
m_albumsModel->appendAlbums( albums );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,6 +445,13 @@ ArtistInfoWidget::onTopHitsMoreClicked()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ArtistInfoWidget::onAlbumsMoreClicked()
|
||||||
|
{
|
||||||
|
m_stackedWidget->setCurrentIndex( 2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistInfoWidget::onTopHitsMoreClosed()
|
ArtistInfoWidget::onTopHitsMoreClosed()
|
||||||
{
|
{
|
||||||
|
@@ -103,6 +103,7 @@ private slots:
|
|||||||
void onSimilarArtistsLoaded();
|
void onSimilarArtistsLoaded();
|
||||||
|
|
||||||
void onBiographyLinkClicked( const QUrl& url );
|
void onBiographyLinkClicked( const QUrl& url );
|
||||||
|
void onAlbumsMoreClicked();
|
||||||
void onTopHitsMoreClicked();
|
void onTopHitsMoreClicked();
|
||||||
void onTopHitsMoreClosed();
|
void onTopHitsMoreClosed();
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
<number>32</number>
|
<number>32</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>8</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="CaptionLabel" name="albumLabel">
|
<widget class="CaptionLabel" name="albumLabel">
|
||||||
@@ -71,17 +71,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<widget class="ClickableLabel" name="albumsMoreLabel">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Vertical</enum>
|
<string>Show More</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Reference in New Issue
Block a user