mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Fixed size for artist images.
This commit is contained in:
@@ -136,6 +136,8 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
|
|
||||||
connect( ui->albumsMoreLabel, SIGNAL( clicked() ), SLOT( onAlbumsMoreClicked() ) );
|
connect( ui->albumsMoreLabel, SIGNAL( clicked() ), SLOT( onAlbumsMoreClicked() ) );
|
||||||
connect( ui->topHitsMoreLabel, SIGNAL( clicked() ), SLOT( onTopHitsMoreClicked() ) );
|
connect( ui->topHitsMoreLabel, SIGNAL( clicked() ), SLOT( onTopHitsMoreClicked() ) );
|
||||||
|
|
||||||
|
ui->cover->setFixedSize( scaled( QSize( 384, 384 ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -370,6 +372,7 @@ ArtistInfoWidget::onBiographyLoaded()
|
|||||||
m_longDescription = m_artist->biography();
|
m_longDescription = m_artist->biography();
|
||||||
emit longDescriptionChanged( m_longDescription );
|
emit longDescriptionChanged( m_longDescription );
|
||||||
|
|
||||||
|
onArtistImageUpdated();
|
||||||
ui->biography->setFixedHeight( ui->cover->width() );
|
ui->biography->setFixedHeight( ui->cover->width() );
|
||||||
|
|
||||||
QString html =
|
QString html =
|
||||||
@@ -389,14 +392,20 @@ ArtistInfoWidget::onBiographyLoaded()
|
|||||||
void
|
void
|
||||||
ArtistInfoWidget::onArtistImageUpdated()
|
ArtistInfoWidget::onArtistImageUpdated()
|
||||||
{
|
{
|
||||||
if ( m_artist->cover( QSize( 0, 0 ) ).isNull() )
|
const QSize coverSize = QSize( ui->cover->width(), ui->cover->width() );
|
||||||
return;
|
if ( !m_artist || m_artist->cover( QSize( 0, 0 ) ).isNull() )
|
||||||
|
{
|
||||||
|
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::Grid, coverSize ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->cover->setPixmap( m_artist->cover( coverSize ) );
|
||||||
|
}
|
||||||
|
|
||||||
m_pixmap = m_artist->cover( QSize( 0, 0 ) );
|
m_pixmap = m_artist->cover( QSize( 0, 0 ) );
|
||||||
emit pixmapChanged( m_pixmap );
|
emit pixmapChanged( m_pixmap );
|
||||||
|
|
||||||
m_headerWidget->setBackground( m_pixmap, true, false );
|
m_headerWidget->setBackground( m_pixmap, true, false );
|
||||||
ui->cover->setPixmap( m_artist->cover( QSize( ui->cover->width(), ui->cover->width() ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -562,16 +571,4 @@ void
|
|||||||
ArtistInfoWidget::resizeEvent( QResizeEvent* event )
|
ArtistInfoWidget::resizeEvent( QResizeEvent* event )
|
||||||
{
|
{
|
||||||
QWidget::resizeEvent( event );
|
QWidget::resizeEvent( event );
|
||||||
|
|
||||||
const QSize coverSize = QSize( ui->cover->width(), ui->cover->width() );
|
|
||||||
if ( !m_artist || m_artist->cover( QSize( 0, 0 ) ).isNull() )
|
|
||||||
{
|
|
||||||
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::Grid, coverSize ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->cover->setPixmap( m_artist->cover( coverSize ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->biography->setFixedHeight( ui->cover->width() );
|
|
||||||
}
|
}
|
||||||
|
@@ -200,7 +200,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWebView" name="biography">
|
<widget class="QWebView" name="biography">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
Reference in New Issue
Block a user